# segmentCreate - admin-graphql - MUTATION Version: 2024-10 ## Description Creates a segment. ### Access Scopes `write_customers` access scope. Also: The user must not have restricted access. ## Arguments * [name](/docs/api/admin-graphql/2024-10/scalars/String): String! - The name of the segment to be created. Segment names must be unique. * [query](/docs/api/admin-graphql/2024-10/scalars/String): String! - A precise definition of the segment. The definition is composed of a combination of conditions on facts about customers such as `email_subscription_status = 'SUBSCRIBED'` with [this syntax](https://shopify.dev/api/shopifyql/segment-query-language-reference). ## Returns * [segment](/docs/api/admin-graphql/2024-10/objects/Segment): Segment The newly created segment. * [userErrors](/docs/api/admin-graphql/2024-10/objects/UserError): UserError! The list of errors that occurred from executing the mutation. ## Examples