# Accounts

{% openapi src="<https://static.usepylon.com/openapi.json>" path="/accounts" method="get" %}
<https://static.usepylon.com/openapi.json>
{% endopenapi %}

{% openapi src="<https://static.usepylon.com/openapi.json>" path="/accounts" method="post" %}
<https://static.usepylon.com/openapi.json>
{% endopenapi %}

## Update multiple accounts

> Updates multiple accounts in a single request. Only provided fields are modified.\
> \
> \*\*Rate limit:\*\* 20 requests per minute

```json
{"openapi":"3.0.1","info":{"title":"Pylon API.","version":"1.0.0"},"servers":[{"url":"https://api.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"UpdateAccountsRequest":{"properties":{"account_ids":{"description":"The account IDs to update. The number of accounts to update must be between 1 and 100.","items":{"type":"string"},"type":"array"},"custom_fields":{"description":"An array of custom fields to be updated on the accounts.","items":{"$ref":"#/components/schemas/CustomFieldValue"},"type":"array"},"owner_id":{"description":"The ID of the new owner. If empty string is passed in, the owner will be removed.","type":"string"},"tags":{"description":"An array of tags to be updated on the accounts.","items":{"type":"string"},"type":"array"},"tags_apply_mode":{"description":"The mode for applying tags. Valid values: \"append_only\", \"remove_only\", \"replace\". Defaults to \"replace\".","type":"string"}},"required":["account_ids"],"type":"object"},"CustomFieldValue":{"properties":{"slug":{"description":"The slug of the custom field.","type":"string"},"value":{"description":"The value of the custom field. Only to be used for single-valued custom fields. If unset, the custom field will be unset. If the custom field is a select field, the value must be the select option slug, which you can find from the GET /custom-fields endpoint.","type":"string"},"values":{"description":"The values of the custom field. Only to be used for multi-valued custom fields (ex. multiselect). If unset, the custom field will be unset. If the custom field is a multiselect field, the values must be the select option slugs which you can find from the GET /custom-fields endpoint.","items":{"type":"string"},"type":"array"}},"type":"object"},"UpdateAccountsResponseBody":{"properties":{"request_id":{"description":"The request ID for tracking.","type":"string"},"success":{"description":"Whether the update was successfully initiated.","type":"boolean"}},"type":"object"},"ErrorApiResponseBody":{"properties":{"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"type":"object"}}},"paths":{"/accounts":{"patch":{"description":"Updates multiple accounts in a single request. Only provided fields are modified.\n\n**Rate limit:** 20 requests per minute","operationId":"UpdateAccounts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountsRequest"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountsResponseBody"}}},"description":""},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""}},"summary":"Update multiple accounts","tags":["accounts"]}}}}
```

{% openapi src="<https://static.usepylon.com/openapi.json>" path="/accounts/{id}" method="get" %}
<https://static.usepylon.com/openapi.json>
{% endopenapi %}

{% openapi src="<https://static.usepylon.com/openapi.json>" path="/accounts/{id}" method="patch" %}
<https://static.usepylon.com/openapi.json>
{% endopenapi %}

{% openapi src="<https://static.usepylon.com/openapi.json>" path="/accounts/{id}" method="delete" %}
<https://static.usepylon.com/openapi.json>
{% endopenapi %}

{% openapi src="<https://static.usepylon.com/openapi.json>" path="/accounts/search" method="post" %}
<https://static.usepylon.com/openapi.json>
{% endopenapi %}
