Stylograph API

Import a list of recipients

Adds up to 500 people to the address book of the key's team in one step, all or nothing, without mailing anyone. Add only: a row that matches someone already in the address book is counted as `existing` and that person is left unchanged (use the Note Composer's CSV import to merge). Rows missing a name or a full address are skipped and listed. Send `dry_run: true` first to see what would happen. The key's member needs a role that can change recipients, and the team's new recipients stay within 1000 in any 24 hours: a batch that would pass that adds nobody. The body may be up to 256 KB.

POST
/api/v1/recipients/import

Adds up to 500 people to the address book of the key's team in one step, all or nothing, without mailing anyone. Add only: a row that matches someone already in the address book is counted as existing and that person is left unchanged (use the Note Composer's CSV import to merge). Rows missing a name or a full address are skipped and listed. Send dry_run: true first to see what would happen. The key's member needs a role that can change recipients, and the team's new recipients stay within 1000 in any 24 hours: a batch that would pass that adds nobody. The body may be up to 256 KB.

Authorization

ApiKeyAuth
headerAuthorizationBearer <API key (sg_live_...)>

An API key from Settings.

Request Body

application/json
  1. body
rows*array<>
Items1 <= items <= 500
dry_run?boolean

Answer what would happen and add nobody.

Defaultfalse

Response Body

A dry run, or nobody new to add.

application/json
  1. response
data*
Example Request
curl -X POST 'https://composer.stylograph.ai/api/v1/recipients/import' \  -H 'Content-Type: application/json' \  -d '{  "rows": [    {      "first_name": "string",      "last_name": "string",      "address_line1": "string",      "city": "string",      "state": "string",      "zip": "string"    }  ]}'
Example Response
{  "data": {    "dry_run": true,    "added": 0,    "existing": 0,    "skipped": [      {        "row": 0,        "recipient": "string",        "errors": {          "property1": "string",          "property2": "string"        }      }    ],    "recipient_ids": [      "bfa6ab48-642a-4965-a829-f20c353d1c93"    ]  }}