Contact Emails

On this page, we'll dive into the different contact email endpoints you can use to manage them programmatically.

The Contact Email object

Contact email objects represent a single email for a contact related to a commercial risk profile. They contain the following properties and relationships:

Commercial-only Properties

These properties are available only for commercial risk profiles.
  • Name
    contact
    Type
    string
    Filterable
    Description

    The UUID of the contact this email belongs to. Only applicable when creating a new email outside the contacts endpoints.

  • Name
    email
    Type
    string
    Filterable
    Sortable
    Description

    The email for the contact

  • Name
    type
    Type
    enum
    Filterable
    Sortable
    Description

    The type of email

    • Name
      work
      Description
      work
    • Name
      personal
      Description
      personal
    • Name
      other
      Description
      other

Meta

  • Name
    created
    Type
    timestamp
    Filterable
    Sortable
    Description

    An ISO-8601 timestamp (UTC) indicating when the contact email was created

  • Name
    updated
    Type
    timestamp
    Filterable
    Sortable
    Description

    An ISO-8601 timestamp (UTC) indicating when the contact email was last updated

Commercial-only Relations

Learn more about including relations.

GET/api/v1/risks/{risk}/data/contact_emails

List all contact emails

This endpoint allows you to retrieve a paginated list of all contact emails related to contacts in the corresponding commercial risk profile.

Parameters

See the contact email object for a list of all available filters and sorts.

Searchable

You can search for contact emails by providing a search query in the filter[search] parameter. The search query will be matched against the contact email address, and contact first and last names.

Additional Filters

  • Name
    uuid
    Type
    string
    Filterable
    Description

    Filter contact emails by UUID (comma-delimited list for many)

  • Name
    contact
    Type
    string|string[]
    Filterable
    Description

    Filter contact emails by their contact's UUID (comma-delimited list for many)

  • Name
    contact.first_name
    Type
    string
    Filterable
    Sortable
    Description

    Filter contact emails by their contact's first name

  • Name
    contact.last_name
    Type
    string
    Filterable
    Sortable
    Description

    Filter contact emails by their contact's last name

Request

GET
/api/v1/risks/{risk}/data/contact_emails
curl -G https://app.wunderite.com/api/v1/risks/{risk}/data/contact_emails \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d per_page=50

Response

{ "data": [ { "object": "contact_email", "uuid": "03ebae86-525e-4d83-9221-03ccb552ddee", "data": { "contact": "6bd2c61e-9840-40b3-9153-1d52379a9b16", "email": "[email protected]", "type": "work" },
"meta": { "created": "2024-04-19T18:57:05+00:00", "updated": "2024-04-19T18:57:05+00:00" }, "relations": { "contact": "6bd2c61e-9840-40b3-9153-1d52379a9b16" } }, { "object": "contact_email", "uuid": "01467093-bd67-47c9-8389-3200c4f14b8b", "data": { "contact": "fefd268c-af53-4099-995f-157a929e46f5", "email": "[email protected]", "type": "work" }, "meta": { "created": "2024-04-19T18:57:05+00:00", "updated": "2024-04-19T18:57:05+00:00" }, "relations": { "contact": "fefd268c-af53-4099-995f-157a929e46f5" } } ], "path": "https:\/\/app.wunderite.com\/api\/v1\/risks\/d10e34bb-4420-47de-ba9f-42a4a3f34b0e\/data\/contact_emails", "per_page": 50, "next_cursor": null, "next_page_url": null, "prev_cursor": null, "prev_page_url": null }

POST/api/v1/risks/{risk}/data/contact_emails

Create contact emails

This endpoint allows you to create new contact emails for contacts that exist in the corresponding commercial risk profile.

At least one contact email object must be provided in the request body.

Required properties

  • Name
    contact
    Type
    string
    Description

    The UUID of the contact to which the email belongs

  • Name
    email
    Type
    string
    Description

    The email address of the contact

Optional properties

See all available properties in the contact email properties section.

  • Name
    type
    Type
    enum
    Description

    If no type is provided, it will default to other.

Request

POST
/api/v1/risks/{risk}/data/contact_emails
curl -X POST "https://app.wunderite.com/api/v1/risks/{risk}/data/contact_emails" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \ 
-d '{
"data": [
    {
        "object": "contact_email",
        "data": {
            "contact": "c659ff46-968a-40a6-9f18-3f9f48704451",
            "email": "[email protected]",
            "type": "work"
        }
    }
]
}'

Response

{ "data": [ { "object": "contact_email", "uuid": "eb87d6ad-6c4e-4ce5-ad8c-d546e32d7dd7", "data": { "contact": "c659ff46-968a-40a6-9f18-3f9f48704451", "email": "[email protected]", "type": "work" },
"meta": { "created": "2024-01-01T00:00:00+00:00", "updated": "2024-01-01T00:00:00+00:00" }, "relations": { "contact": "c659ff46-968a-40a6-9f18-3f9f48704451" } } ] }

PATCH/api/v1/risks/{risk}/data

Update contact emails

This endpoint allows you to perform bulk updates on contact emails.

Optional properties

See all available properties in the contact properties section.

Caveats

Contact

  • The contact on a contact_email object cannot be updated.
  • Attempting to update a contact_email's contact will result in a validation error.

Request

PATCH
/api/v1/risks/{risk}/data
curl -X PATCH "https://app.wunderite.com/api/v1/risks/{risk}/data" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \ 
-d '{
"data": [
    {
        "object": "contact_email",
        "uuid": "d5ed78e4-8964-4957-8f26-ac97fe7a95c2",
        "data": {
            "email": "[email protected]",
            "type": "work"
        }
    }
]
}'

Response

{ "data": [ { "object": "contact_email", "uuid": "d5ed78e4-8964-4957-8f26-ac97fe7a95c2", "data": { "email": "[email protected]", "type": "work" }, "profile_type": "commercial"
} ] }

DELETE/api/v1/risks/{risk}/data

Delete contact emails

This endpoint allows you to bulk delete risk data, including contact emails.

At least one contact email object must be provided in the request body to delete the corresponding contact email.

Required properties

  • Name
    object
    Type
    string
    Description

    The object type of the data to delete. Must be contact_email in this case.

  • Name
    uuid
    Type
    string
    Description

    The UUID of the contact email to delete

Request

DELETE
/api/v1/risks/{risk}/data
curl -X DELETE "https://app.wunderite.com/api/v1/risks/{risk}/data" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \ 
-d '{
"data": [
    {
        "object": "contact_email",
        "uuid": "d5ed78e4-8964-4957-8f26-ac97fe7a95c2"
    }
]
}'

Response

{
    "data": [
        {
            "object": "contact_email",
            "uuid": "d5ed78e4-8964-4957-8f26-ac97fe7a95c2",
            "profile_type": "commercial"
        }
    ]
}