Add one or more contacts to a temporary mailing list.
POST https://www.prayerletters.com/api/v1/lists/{list_id}/contacts
The example request shows all of the available fields, except for country in the address block. As of this writing, the body may contain up to 1MB of JSON. Make several calls to this endpoint if you need to upload more than that. Also as of this writing, there can be up to 100 metadata fields, and each field can contain up to 1,000 characters. If this changes, the error message will indicate the current limit.

URL Parameters

list_id
The ID of the list to be updated.

Example Request

{ "data" : [ { "address" : { "city" : "Lebanon", "postal_code" : "03766", "state" : "NH", "street" : "123 Main St." }, "external_id" : "0123456", "file_as" : "Tischler, Joe and Mary", "greeting" : "Joe and Mary", "metadata" : { "amount" : "$50.00" }, "name" : "Joe and Mary Tischler", "type" : "contact" } ], "type" : "contacts" }

Successful Response

HTTP/1.1 200 OK
{ "contacts" : [ { "external_id" : "0123456", "id" : "a-22m-zqfb" } ] }

Error Responses

400 lists.insufficient_address
The address for the specified contact is incomplete.
400 lists.invalid_address
The address field must be an object.
400 lists.invalid_data_array
The contacts object must contain a data array.
400 lists.invalid_field
The request included an unrecognized field.
400 lists.invalid_field_length
The value for the specified field is too long.
400 lists.invalid_field_value
This field must be a string.
400 lists.invalid_metadata
The metadata field, if present, must be an object.
400 lists.invalid_metadata_field
The specified metadata field contains invalid characters.
400 lists.invalid_metadata_length
The value for the specified metadata field is too long.
400 lists.invalid_type
The body of the request must be a contacts object. Each contact must be a contact object.
400 lists.missing_address
Each contact must contain an address.
400 lists.missing_name
Each contact must contain a name or company.
400 lists.too_much_metadata
The maximum number of custom fields has been exceeded for the specified contact.
400 lists.undefined_metadata_value
Metadata fields may not have null values.
403 lists.permission_error
You need the lists.write scope to perform this action.
404 not_found
The requested list doesn't exist.
423 lists.locked
Another update to this list is in process.
500 lists.error_creating_record
There was a database error creating this contact.