--- title: segmentDelete - GraphQL Admin description: Deletes a segment. api_version: 2024-10 api_name: admin type: mutation api_type: graphql source_url: html: 'https://shopify.dev/docs/api/admin-graphql/2024-10/mutations/segmentDelete' md: >- https://shopify.dev/docs/api/admin-graphql/2024-10/mutations/segmentDelete.txt --- # segment​Delete mutation Requires `write_customers` access scope. Also: The user must not have restricted access. Deletes a segment. ## Arguments * id [ID!](https://shopify.dev/docs/api/admin-graphql/2024-10/scalars/ID) required Specifies the segment to delete. *** ## Segment​Delete​Payload returns * deleted​Segment​Id [ID](https://shopify.dev/docs/api/admin-graphql/2024-10/scalars/ID) ID of the deleted segment. * user​Errors [\[User​Error!\]!](https://shopify.dev/docs/api/admin-graphql/2024-10/objects/UserError) non-null The list of errors that occurred from executing the mutation. *** ## Examples * ### segmentDelete reference ## Mutation Reference ```graphql mutation segmentDelete($id: ID!) { segmentDelete(id: $id) { deletedSegmentId userErrors { field message } } } ``` ## Input ```json { "id": "gid://shopify//10079785100" } ```