{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"**This endpoint allows you to update a segment.**","properties":{"path":{"type":"object","properties":{"segment_id":{"type":"integer"}},"required":["segment_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"on-behalf-of":{"type":"string","description":"The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information."}},"required":[],"additionalProperties":false},"body":{"type":"object","properties":{"name":{"type":"string"},"list_id":{"type":"number","description":"The list ID you would like this segment to be built from."},"conditions":{"type":"array","description":"The conditions by which this segment should be created.","items":{"$ref":"#/definitions/ContactdbSegmentsConditions"}}},"required":["name"],"examples":[{"name":"The Millers","list_id":5,"conditions":[{"field":"last_name","value":"Miller","operator":"eq","and_or":""}]}]}},"required":["path"],"additionalProperties":false,"definitions":{"ContactdbSegmentsConditions":{"title":"ContactDB: Segments: Conditions","type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"operator":{"allOf":[{"$ref":"#/definitions/Operator"},{"type":"string"}]},"and_or":{"allOf":[{"$ref":"#/definitions/AndOr"},{"type":"string"}]}},"required":["field","value","operator"]},"Operator":{"type":"string","enum":["eq","ne","lt","gt","contains"]},"AndOr":{"type":"string","enum":["and","or",""]}}},"name":"Update a segment","id":"sendgrid.lmc_contactdb.updatesegment","example":{"path":{"segment_id":1}},"maxRequests":1,"summary":false}}