[[update-connector-status-api]] === Update connector status API ++++ Update connector status ++++ preview::[] Updates the `status` of a connector. To get started with Connector APIs, check out <>. [[update-connector-status-api-request]] ==== {api-request-title} `PUT _connector//_status` [[update-connector-status-api-prereq]] ==== {api-prereq-title} * To sync data using self-managed connectors, you need to deploy the <>. on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors. * The `connector_id` parameter should reference an existing connector. * The change of `status` must be a valid status transition according to the https://github.com/elastic/connectors/blob/main/docs/CONNECTOR_PROTOCOL.md[Connector Protocol]. [[update-connector-status-api-path-params]] ==== {api-path-parms-title} ``:: (Required, string) [role="child_attributes"] [[update-connector-status-api-request-body]] ==== {api-request-body-title} `status`:: (Required, string) A valid connector status string, defined in the Connector Framework. [[update-connector-status-api-response-codes]] ==== {api-response-codes-title} `200`:: Connector `status` field was successfully updated. `400`:: The `connector_id` was not provided, the request payload was malformed, or the given status transition is not supported. `404` (Missing resources):: No connector matching `connector_id` could be found. [[update-connector-status-api-example]] ==== {api-examples-title} The following example updates the `status` of the connector with ID `my-connector`: //// [source, console] -------------------------------------------------- PUT _connector/my-connector { "index_name": "search-google-drive", "name": "My Connector", "service_type": "needs_configuration" } -------------------------------------------------- // TESTSETUP [source,console] -------------------------------------------------- DELETE _connector/my-connector -------------------------------------------------- // TEARDOWN //// [source,console] ---- PUT _connector/my-connector/_status { "status": "needs_configuration" } ---- [source,console-result] ---- { "result": "updated" } ----