---
title: "Create or update accounts in a batch"
method: POST
path: "/entities/Accounts/batch-modify"
tags: ["Account"]
---

# Create or update accounts in a batch

`POST /entities/Accounts/batch-modify`

## Request

- Base URL: `https://us-east.api.coevera.com/api/v100/rest/spaces/your_space_id`
- URL: `https://us-east.api.coevera.com/api/v100/rest/spaces/your_space_id/entities/Accounts/batch-modify`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/coevera/apis/coevera-crm-api/docs/entities/Accounts/batch-modify/post.ts> (a function with typed inputs; its response is checked against the schema)

An item with an `id` updates that account; an item without one creates an account. By default one invalid item fails the whole call with HTTP 422 and nothing is written; with `rollback-method=1` the valid items are written and the response has an id or an error for each item, in input order.

## Query parameters

- `validation-level` integer
- `rollback-method` 0 | 1

## Request body

- BatchAccountInput[]
  - `created` string, date-time: Creation time.
  - `picture` object: Profile picture or company logo associated with the account. Related CloudObject record; see 'updateCloudObjectInput' for its fields.
    - `id` string, uuid: Id of the related CloudObject record.
  - `account_class` 1 | 2 | 3 | 4 | 5: Manual classification grade assigned to the account. Used in segmentation and reporting. Integer enum value: 1 - NoClass, 2 - ClassA, 3 - ClassB, 4 - ClassC, 5 - ClassD
  - `account_type_id` string, uuid: Id of the account type assigned to this account.
  - `address` string: Street address of the account.
  - `city` string: City of the account address.
  - `comments` string: Free-form notes describing the account.
  - `country` string: Country of the account address.
  - `currency_exchange_rates_list_id` string, uuid: Id of the currency exchange rate list applied to this account.
  - `customer_type_id` string, uuid: Id of the customer type (e.g. Lead, Prospect, Customer) that classifies the account.
  - `email1` string: Primary email address of the account. Used as default recipient for emails sent from Coevera.
  - `email2` string: Additional email address.
  - `email3` string: Additional email address.
  - `email4` string: Additional email address.
  - `email5` string: Additional email address.
  - `home_page` string: Website URL of the account. May be auto-filled from the primary email domain when domain extraction is enabled.
  - `industry_id` string, uuid: Id of the industry classification.
  - `is_archived` boolean: True when the account has been archived. Archived accounts remain readable but are hidden from active lists and cannot be edited until reactivated.
  - `last_ai_account_hierarchy_applied` string, date-time: Time when an AI-suggested account hierarchy was last applied to this account.
  - `last_ai_org_chart_applied` string, date-time: Time when an AI-suggested org chart was last applied to this account.
  - `name` string: Name of the entity and its default text representation.
  - `owner_id` string, uuid: Id of the account owner.
  - `parent_account_id` string, uuid: Id of the parent account in the corporate hierarchy. Empty for top-level accounts.
  - `parent_account_relation_type_id` string, uuid: Id of the parent-account relationship type.
  - `phone1` string: Primary phone number of the account. Used as default target for click-to-call.
  - `phone2` string: Additional phone number.
  - `phone3` string: Additional phone number.
  - `phone4` string: Additional phone number.
  - `phone5` string: Additional phone number.
  - `picture_id` string, uuid: Id of the profile picture document.
  - `quick_parent_account_name` string: Free-text parent-account name used when the parent has not been linked to an actual Account record. Lets integrators note the relationship without creating a separate parent Account.
  - `share_mode` 0 | 1 | 2 | 3: Sharing model applied on top of the owner/unit visibility (e.g. shared with selected sales units or selected users). The matching sharing_units / sharing_clients lists control who is granted access. Integer enum value: 0 - Standard, 1 - Private, 2 - AllView, 3 - AllEdit
  - `state_province` string: State or province of the account address.
  - `unit_id` string, uuid: Id of the sales unit.
  - `zip_code` string: ZIP or postal code of the account address.
  - `revision` integer: Revision when entity was lastly changed.
  - `social_media` object: Social network profiles linked to this account (e.g. LinkedIn, Facebook). Related AccountSocialRelation record; see 'updateAccountSocialRelationInput' for its fields.
    - `id` string, uuid: Id of the related AccountSocialRelation record.
  - `sharing_units` object[]: Sales units that have been granted shared access to this account. Editable only when share_mode allows unit sharing.
    - `id` string, uuid: Id of the related AccountSharingSalesUnitRelation record.
  - `sharing_clients` object[]: Users that have been granted shared access to this account. Editable only when share_mode allows user sharing.
    - `id` string, uuid: Id of the related AccountSharingClientRelation record.
  - `documents` object[]: Documents linked to this account.
    - `id` string, uuid: Id of the related CloudObjectRelation record.
  - `is_unsubscribed` boolean: If account has any unsubscribed email.
  - `tags` object[]: Tag labels applied to this account.
    - `id` string, uuid: Id of the related TagRelation record.
  - `static_profiles` object[]: Saved view profiles this account currently matches.
    - `id` string, uuid: Id of the related ProfileRelation record.
  - `id` string, uuid: ID of object to update.

## Response `200`

Result per item, in request order: the id of the created or updated record, or the error.

- object
  - `success` boolean: True when the request succeeded; false on error.
  - `data` union[]
    - union
      - string, uuid: Id of the created or updated record.
      - Error: The body of every REST error. `code` and `name` are stable identifiers; `message` is for people. The full list of codes is at https://developers.coevera.com/reference/errors/.
        - `http_status` integer, required: HTTP status code.
        - `code` integer: Numeric code of the API error.
        - `name` string: Name of the API error.
        - `message` string: Message describing the error.
        - `success` boolean, required: Always false on error.

## Other responses

- `400`: Bad request: a bad or unknown parameter (codes 117, 118), a missing permission (code 50), conflicting data (code 2002) or any other API error. The REST API answers 400 where others answer 403 or 409; check `code`.
- `401`: Not authenticated: missing or wrong credentials, a credential of another space, or an expired token (code 401, ERROR_UNAUTHORIZED).
- `422`: Validation failed (code 40000, with the failing fields) or a required parameter is missing (code 119). By default one failed item fails a whole batch and nothing is written.
- `429`: Too many requests (code 182). Wait for the seconds in Retry-After, then retry.
- `500`: Unexpected server error (code 1000, ERROR_UNKNOWN).

---

[API](https://skmtc.dev/coevera/apis/coevera-crm-api.md) - [All operations](https://skmtc.dev/coevera/apis/coevera-crm-api/llms.txt) - [OpenAPI document](https://skmtc.dev/coevera/apis/coevera-crm-api/revisions/40ebbc83f179?raw)
