Requires write_customers access scope. Also: The user must not have restricted access.

Deletes a segment.


Anchor to id
id
required

Specifies the segment to delete.


Was this section helpful?

ID of the deleted segment.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation segmentDelete($id: ID!) {
  segmentDelete(id: $id) {
    deletedSegmentId
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "id": "gid://shopify/<objectName>/10079785100"
}