Contacts

Creates a contact. This will also verify the contact's address if you create it using a live API key. To sucessfully create a contact, either a firstName, a companyName, or both are required. You can supply both, but you cannot supply neither.

You have the option to supply the entire address (except for countryCode) via addressLine1, in which case PostGrid will parse it automatically. However, this is not guaranteed to be correct, so we recommend passing along the structured address fields (city, provinceOrState, etc) if you have them.

Note that if you create a contact that has identical information to another contact, this will simply update the description of the existing contact and return it. This avoids creating duplicate contacts.

post/print-mail/v1/contacts

Request

  • Base URL
    https://api.postgrid.com
  • URL
    https://api.postgrid.com/print-mail/v1/contacts
  • Auth
    API key in header X-API-Key

Request body

OR

Response

The request has succeeded and a new resource has been created as a result.

idstring required

A unique ID prefixed with contact_

descriptionstring

An optional string describing this resource. Will be visible in the API and the dashboard.

metadataobject

See the section on Metadata.

liveboolean required

true if this is a live mode resource else false.

createdAtstring date-time required

The UTC time at which this resource was created.

updatedAtstring date-time required

The UTC time at which this resource was last updated.

Changes

    • info

      added the new optional request property ////

    • info

      added the new optional request property ////

    • info

      added the optional property to the response with the status

    • warning

      added the new internal_server_error enum value to the / response property for the response status

    • warning

      added the new not_found_error enum value to the / response property for the response status

    • warning

      added the new rate_limit_exceeded_error enum value to the / response property for the response status

    • warning

      added the new validation_error enum value to the / response property for the response status

    • info

      added subschema #1 subschema #2 to the response body anyOf list for the response status

    • info

      removed subschema #1 subschema #2 from the response body anyOf list for the response status