Email Addresses
Email Addresses can be attached to Profile objects for the purpose of usage in payments that are routed to networks that require email addresses, and can also be used for the purpose of sending to third-party data providers for things like risk management or fraud prevention.
Data Types
EmailAddressResponse
EmailAddressResponse Example
{
"type": "email-addresses",
"id": "4c72784e-fb2a-4858-8067-95b6e36d54c0",
"attributes": {
"email": "user@example.com",
"metadata": "{}",
"created-at": "2024-05-01T00:00:00Z",
"updated-at": "2024-05-01T00:00:00Z"
},
"relationships": {
"owner": {
"data": {
"type": "applications",
"id": "4c72784e-fb2a-4858-8067-95b6e36d54c0"
}
}
}
}
EmailAddressRequest
Key | Value | |
---|---|---|
type | email-addresses | Required |
Attributes | ||
String | Required | |
metadata | Metadata | |
Relationships | ||
owner | OwnerRelationship | Required |
EmailAddressRequest Example
{
"data": {
"type": "email-addresses",
"attributes": {
"email": "user@example.com",
"metadata": "{}"
},
"relationships": {
"owner": {
"data": {
"type": "profiles",
"id": "4c72784e-fb2a-4858-8067-95b6e36d54c0"
}
}
}
}
}
GET/v1/email-addresses
List Email Addresses
This endpoint retrieves a paginated list of Email Addresses. By default, a maximum of thirty Email Addresses are shown per page.
This endpoint returns an array of EmailAddressResponse objects.
Filters
- Name
created_between
- Type
- object
- Description
- See documentation for filtering by timestamps.
- Name
updated_between
- Type
- object
- Description
- See documentation for filtering by timestamps.
- Name
metadata
- Type
- object
- Description
- See documentation for filtering by metadata.
- Name
page
- Type
- object
- Description
- See documentation for pagination.
Request
GET
/v1/email-addresses curl --request GET \
--url 'https://api.opentransact.com/v1/email-addresses' \
--header 'Authorization: Basic {API_KEY}'
Response
{
"data": [
{
"type": "email-addresses",
"id": "xgQQXg3hrtjh7AvZ",
"attributes": {
"email": "user@example.com",
"metadata": "{}",
"created-at": "2024-05-01T00:00:00Z",
"updated-at": "2024-05-01T00:00:00Z"
},
"relationships": {
"owner": {
"data": {
"type": "applications",
"id": "4c72784e-fb2a-4858-8067-95b6e36d54c0"
}
}
}
},
... // 29 more email addresses
],
"meta": {
"page-count": 2,
"count": 38,
"current-page": 1
},
"links": {
"self": "https://api.opentransact.com/v1/email-addresses?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"first": "https://api.opentransact.com/v1/email-addresses?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "https://api.opentransact.com/v1/email-addresses?page%5Bnumber%5D=2&page%5Bsize%5D=30",
"next": "https://api.opentransact.com/v1/email-addresses?page%5Bnumber%5D=2&page%5Bsize%5D=30"
}
}
POST/v1/email-addresses
Create an Email Address
This endpoint creates a new Email Address.
This endpoint accepts an EmailAddressRequest object and returns a EmailAddressResponse object.
Request
POST
/v1/email-addressescurl --request POST \
--url https://api.opentransact.com/v1/email-addresses \
--header 'Authorization: Basic {API_KEY}' \
--header 'Content-Type: application/vnd.api+json' \
--data '{
"data":{
"type": "email-addresses",
"attributes": {
"email": "john.smiths@test.com"
},
"relationships": {
"owner": {
"data": {
"type": "profiles",
"id": "{PROFILE_ID}"
}
}
}
}
}'
Response
{
"data": {
"type": "email-addresses",
"id": "4c72784e-fb2a-4858-8067-95b6e36d54c0",
"attributes": {
"email": "john.smiths@test.com",
"metadata": "{}",
"created-at": "2024-05-01T00:00:00Z",
"updated-at": "2024-05-01T00:00:00Z"
},
"relationships": {
"owner": {
"data": {
"type": "profiles",
"id": "4c72784e-fb2a-4858-8067-95b6e36d54c0"
}
}
}
}
}
GET/v1/email-addresses/:id
Show an Email Address
This endpoint retrieves the details of an Email Address by providing its ID.
This endpoint returns an EmailAddressResponse object.
Request
GET
/v1/email-addresses/xgQQXg3hrtjh7AvZcurl --request GET \
--url https://api.opentransact.com/v1/email-addresses/{EMAIL_ADDRESS_ID} \
--header 'Authorization: Basic {API_KEY}'
Response
{
"data": {
"type": "email-addresses",
"id": "4c72784e-fb2a-4858-8067-95b6e36d54c0",
"attributes": {
"email": "user@example.com",
"metadata": "{}",
"created-at": "2024-05-01T00:00:00Z",
"updated-at": "2024-05-01T00:00:00Z"
},
"relationships": {
"owner": {
"data": {
"type": "profiles",
"id": "4c72784e-fb2a-4858-8067-95b6e36d54c0"
}
}
}
}
}