### GET /components
Source: https://app.loops.so/openapi.json
Retrieve a paginated list of email components.
```markdown
### Parameters
- **perPage** (string, query, optional): How many results to return in each request. Must be between 10 and 50. Default is 20.
- **cursor** (string, query, optional): A cursor to return a specific page of results. Cursors can be found from the `pagination.nextCursor` value in each response.
### Responses
#### 200 - Successful.
**ListComponentsResponse**
- **success** (boolean) (required)
- **pagination** (object) (required)
- **totalResults** (number)
- **returnedResults** (number)
- **perPage** (number)
- **totalPages** (number)
- **nextCursor** (string,null)
- **nextPage** (string,null)
- **data** (array (Component)) (required)
Array items:
- **componentId** (string) (required)
- **name** (string) (required)
- **lmx** (string) (required): The component body serialized as LMX.
#### 400 - Invalid `perPage` value.
**ComponentFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
#### 401 - Invalid API key or content API not enabled for this team.
Invalid API key or content API not enabled for this team.
#### 405 - Wrong HTTP request method.
Wrong HTTP request method.
### Example Usage
```bash
curl -X GET "https://app.loops.so/api/v1/components?perPage=string&cursor=string"
```
```
--------------------------------
### GET /api-key
Source: https://app.loops.so/openapi.json
API endpoint for GET /api-key
```markdown
### Responses
#### 200 - Success
- **success** (boolean) (required)
- **teamName** (string) (required): The name of the team the API key belongs to.
#### 401 - Invalid API key
- **success** (boolean)
- **message** (string)
- **error** (string)
### Example Usage
```bash
curl -X GET "https://app.loops.so/api/v1/api-key"
```
```
--------------------------------
### GET /themes/{themeId}
Source: https://app.loops.so/openapi.json
Retrieve a single theme by ID.
```markdown
### Responses
#### 200 - Successful.
**ThemeResponse**
- **success** (boolean) (required)
- **themeId** (string) (required)
- **name** (string) (required)
- **styles** (object) (required): Flat map of style attributes, matching the attribute names accepted by the LMX `` tag. Only keys with a value set on the theme are returned; all keys are optional.
- **backgroundColor** (string)
- **backgroundXPadding** (number)
- **backgroundYPadding** (number)
- **bodyColor** (string)
- **bodyXPadding** (number)
- **bodyYPadding** (number)
- **bodyFontFamily** (string)
- **bodyFontCategory** (string)
- **borderColor** (string)
- **borderWidth** (number)
- **borderRadius** (number)
- **buttonBodyColor** (string)
- **buttonBodyXPadding** (number)
- **buttonBodyYPadding** (number)
- **buttonBorderColor** (string)
- **buttonBorderWidth** (number)
- **buttonBorderRadius** (number)
- **buttonTextColor** (string)
- **buttonTextFormat** (number)
- **buttonTextFontSize** (number)
- **dividerColor** (string)
- **dividerBorderWidth** (number)
- **textBaseColor** (string)
- **textBaseFontSize** (number)
- **textBaseLineHeight** (number)
- **textBaseLetterSpacing** (number)
- **textLinkColor** (string)
- **heading1Color** (string)
- **heading1FontSize** (number)
- **heading1LineHeight** (number)
- **heading1LetterSpacing** (number)
- **heading2Color** (string)
- **heading2FontSize** (number)
- **heading2LineHeight** (number)
- **heading2LetterSpacing** (number)
- **heading3Color** (string)
- **heading3FontSize** (number)
- **heading3LineHeight** (number)
- **heading3LetterSpacing** (number)
- **isDefault** (boolean) (required): Whether this theme is the team's default.
- **createdAt** (string) (required): ISO 8601 timestamp.
- **updatedAt** (string) (required): ISO 8601 timestamp.
#### 400 - Invalid `themeId`.
**ThemeFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
#### 401 - Invalid API key or content API not enabled for this team.
Invalid API key or content API not enabled for this team.
#### 404 - Theme not found.
**ThemeFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
#### 405 - Wrong HTTP request method.
Wrong HTTP request method.
### Example Usage
```bash
curl -X GET "https://app.loops.so/api/v1/themes/{themeId}"
```
```
--------------------------------
### GET /transactional
Source: https://app.loops.so/openapi.json
Get a list of published transactional emails.
```markdown
### Parameters
- **perPage** (string, query, optional): How many results to return in each request. Must be between 10 and 50. Default is 20.
- **cursor** (string, query, optional): A cursor, to return a specific page of results. Cursors can be found from the `pagination.nextCursor` value in each response.
### Responses
#### 200 - Successful.
**ListTransactionalsResponse**
- **pagination** (object)
- **totalResults** (number)
- **returnedResults** (number)
- **perPage** (number)
- **totalPages** (number)
- **nextCursor** (string,null)
- **nextPage** (string,null)
- **data** (array (TransactionalEmail))
Array items:
- **id** (string) (required)
- **name** (string) (required)
- **lastUpdated** (string) (required)
- **dataVariables** (array) (required)
#### 405 - Wrong HTTP request method.
Wrong HTTP request method.
### Example Usage
```bash
curl -X GET "https://app.loops.so/api/v1/transactional?perPage=string&cursor=string"
```
```
--------------------------------
### GET /themes
Source: https://app.loops.so/openapi.json
Retrieve a paginated list of email themes, most recently created first.
```markdown
### Parameters
- **perPage** (string, query, optional): How many results to return in each request. Must be between 10 and 50. Default is 20.
- **cursor** (string, query, optional): A cursor to return a specific page of results. Cursors can be found from the `pagination.nextCursor` value in each response.
### Responses
#### 200 - Successful.
**ListThemesResponse**
- **success** (boolean) (required)
- **pagination** (object) (required)
- **totalResults** (number)
- **returnedResults** (number)
- **perPage** (number)
- **totalPages** (number)
- **nextCursor** (string,null)
- **nextPage** (string,null)
- **data** (array (Theme)) (required)
Array items:
- **themeId** (string) (required)
- **name** (string) (required)
- **styles** (object) (required): Flat map of style attributes, matching the attribute names accepted by the LMX `` tag. Only keys with a value set on the theme are returned; all keys are optional.
- **backgroundColor** (string)
- **backgroundXPadding** (number)
- **backgroundYPadding** (number)
- **bodyColor** (string)
- **bodyXPadding** (number)
- **bodyYPadding** (number)
- **bodyFontFamily** (string)
- **bodyFontCategory** (string)
- **borderColor** (string)
- **borderWidth** (number)
- **borderRadius** (number)
- **buttonBodyColor** (string)
- **buttonBodyXPadding** (number)
- **buttonBodyYPadding** (number)
- **buttonBorderColor** (string)
- **buttonBorderWidth** (number)
- **buttonBorderRadius** (number)
- **buttonTextColor** (string)
- **buttonTextFormat** (number)
- **buttonTextFontSize** (number)
- **dividerColor** (string)
- **dividerBorderWidth** (number)
- **textBaseColor** (string)
- **textBaseFontSize** (number)
- **textBaseLineHeight** (number)
- **textBaseLetterSpacing** (number)
- **textLinkColor** (string)
- **heading1Color** (string)
- **heading1FontSize** (number)
- **heading1LineHeight** (number)
- **heading1LetterSpacing** (number)
- **heading2Color** (string)
- **heading2FontSize** (number)
- **heading2LineHeight** (number)
- **heading2LetterSpacing** (number)
- **heading3Color** (string)
- **heading3FontSize** (number)
- **heading3LineHeight** (number)
- **heading3LetterSpacing** (number)
- **isDefault** (boolean) (required): Whether this theme is the team's default.
- **createdAt** (string) (required): ISO 8601 timestamp.
- **updatedAt** (string) (required): ISO 8601 timestamp.
#### 400 - Invalid `perPage` value.
**ThemeFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
#### 401 - Invalid API key or content API not enabled for this team.
Invalid API key or content API not enabled for this team.
#### 405 - Wrong HTTP request method.
Wrong HTTP request method.
### Example Usage
```bash
curl -X GET "https://app.loops.so/api/v1/themes?perPage=string&cursor=string"
```
```
--------------------------------
### GET /lists
Source: https://app.loops.so/openapi.json
Retrieve a list of your account's mailing lists.
```markdown
### Responses
#### 200 - Successful.
- Array of MailingList
#### 405 - Wrong HTTP request method.
Wrong HTTP request method.
### Example Usage
```bash
curl -X GET "https://app.loops.so/api/v1/lists"
```
```
--------------------------------
### GET /components/{componentId}
Source: https://app.loops.so/openapi.json
Retrieve a single component by ID.
```markdown
### Responses
#### 200 - Successful.
**ComponentResponse**
- **success** (boolean) (required)
- **componentId** (string) (required)
- **name** (string) (required)
- **lmx** (string) (required): The component body serialized as LMX.
#### 400 - Invalid `componentId`.
**ComponentFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
#### 401 - Invalid API key or content API not enabled for this team.
Invalid API key or content API not enabled for this team.
#### 404 - Component not found.
**ComponentFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
#### 405 - Wrong HTTP request method.
Wrong HTTP request method.
### Example Usage
```bash
curl -X GET "https://app.loops.so/api/v1/components/{componentId}"
```
```
--------------------------------
### GET /contacts/properties
Source: https://app.loops.so/openapi.json
Retrieve a list of your account's contact properties.
Use the `list` parameter to query "all" or "custom" properties.
```markdown
### Parameters
- **list** (string, query, optional): \"all\" (default) or \"custom\"
### Responses
#### 200 - Successful.
- Array of ContactProperty
#### 405 - Wrong HTTP request method.
Wrong HTTP request method.
### Example Usage
```bash
curl -X GET "https://app.loops.so/api/v1/contacts/properties?list=string"
```
```
--------------------------------
### GET /contacts/find
Source: https://app.loops.so/openapi.json
Search for a contact by `email` or `userId`. Only one parameter is allowed.
```markdown
### Parameters
- **email** (string, query, optional): Email address (URI-encoded)
- **userId** (string, query, optional)
### Responses
#### 200 - List of contacts (or an empty array if no contact was found). Contact objects will include any custom properties.
- Array of Contact
#### 400 - Bad request (e.g. invalid email address).
**ContactFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
#### 405 - Wrong HTTP request method.
Wrong HTTP request method.
### Example Usage
```bash
curl -X GET "https://app.loops.so/api/v1/contacts/find?email=string&userId=string"
```
```
--------------------------------
### GET /dedicated-sending-ips
Source: https://app.loops.so/openapi.json
Retrieve a list of Loops' dedicated sending IP addresses.
```markdown
### Responses
#### 200 - Successful.
- Array of string
#### 405 - Wrong HTTP request method.
Wrong HTTP request method.
#### 500 - Internal server error.
- **success** (boolean) (required)
- **message** (string) (required)
### Example Usage
```bash
curl -X GET "https://app.loops.so/api/v1/dedicated-sending-ips"
```
```
--------------------------------
### GET /contacts/suppression
Source: https://app.loops.so/openapi.json
Retrieve suppression status and removal quota for a contact by `email` or `userId`. Include only one query parameter.
```markdown
### Parameters
- **email** (string, query, optional): Email address (URI-encoded)
- **userId** (string, query, optional)
### Responses
#### 200 - Successful.
**ContactSuppressionStatusResponse**
- **contact** (object) (required)
- **id** (string) (required)
- **email** (string) (required)
- **userId** (string,null) (required)
- **isSuppressed** (boolean) (required)
- **removalQuota** (object) (required)
- **limit** (number) (required)
- **remaining** (number) (required)
#### 400 - Bad request (e.g. invalid email address).
**ContactFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
#### 404 - Contact not found.
**ContactFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
#### 405 - Wrong HTTP request method.
Wrong HTTP request method.
### Example Usage
```bash
curl -X GET "https://app.loops.so/api/v1/contacts/suppression?email=string&userId=string"
```
```
--------------------------------
### POST /contacts/create
Source: https://app.loops.so/openapi.json
Add a contact to your audience.
```markdown
### Request Body
**Content-Type:** application/json
- **email** (string) (required)
- **firstName** (string)
- **lastName** (string)
- **subscribed** (boolean)
- **userGroup** (string)
- **userId** (string)
- **mailingLists** (object): An object of mailing list IDs and boolean subscription statuses.
### Responses
#### 200 - Successful create.
**ContactSuccessResponse**
- **success** (boolean) (required)
- **id** (string) (required)
#### 400 - Bad request (e.g. invalid email address).
**ContactFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
#### 405 - Wrong HTTP request method.
Wrong HTTP request method.
#### 409 - Email or `userId` already exists.
**ContactFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
### Example Usage
```bash
curl -X POST "https://app.loops.so/api/v1/contacts/create" \
-H "Content-Type: application/json" \
-d '{
"email": "string",
"firstName": "string",
"lastName": "string",
"subscribed": "true",
"userGroup": "string",
"userId": "string",
"mailingLists": "value"
}'
```
```
--------------------------------
### POST /contacts/properties
Source: https://app.loops.so/openapi.json
Add a contact property to your team.
```markdown
### Request Body
**Content-Type:** application/json
- **name** (string) (required)
- **type** (string) (required)
### Responses
#### 200 - Successful create.
**ContactPropertySuccessResponse**
- **success** (boolean) (required)
#### 400 - Bad request (e.g. invalid type).
**ContactPropertyFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
#### 405 - Wrong HTTP request method.
Wrong HTTP request method.
### Example Usage
```bash
curl -X POST "https://app.loops.so/api/v1/contacts/properties" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"type": "string"
}'
```
```
--------------------------------
### Schema: ThemeStyles
Source: https://app.loops.so/openapi.json
Flat map of style attributes, matching the attribute names accepted by the LMX `` tag. Only keys with a value set on the theme are returned; all keys are optional.
```markdown
## Schema: ThemeStyles
Flat map of style attributes, matching the attribute names accepted by the LMX `` tag. Only keys with a value set on the theme are returned; all keys are optional.
**Type:** object
- **backgroundColor** (string)
- **backgroundXPadding** (number)
- **backgroundYPadding** (number)
- **bodyColor** (string)
- **bodyXPadding** (number)
- **bodyYPadding** (number)
- **bodyFontFamily** (string)
- **bodyFontCategory** (string)
- **borderColor** (string)
- **borderWidth** (number)
- **borderRadius** (number)
- **buttonBodyColor** (string)
- **buttonBodyXPadding** (number)
- **buttonBodyYPadding** (number)
- **buttonBorderColor** (string)
- **buttonBorderWidth** (number)
- **buttonBorderRadius** (number)
- **buttonTextColor** (string)
- **buttonTextFormat** (number)
- **buttonTextFontSize** (number)
- **dividerColor** (string)
- **dividerBorderWidth** (number)
- **textBaseColor** (string)
- **textBaseFontSize** (number)
- **textBaseLineHeight** (number)
- **textBaseLetterSpacing** (number)
- **textLinkColor** (string)
- **heading1Color** (string)
- **heading1FontSize** (number)
- **heading1LineHeight** (number)
- **heading1LetterSpacing** (number)
- **heading2Color** (string)
- **heading2FontSize** (number)
- **heading2LineHeight** (number)
- **heading2LetterSpacing** (number)
- **heading3Color** (string)
- **heading3FontSize** (number)
- **heading3LineHeight** (number)
- **heading3LetterSpacing** (number)
```
--------------------------------
### Schema: ThemeResponse
Source: https://app.loops.so/openapi.json
Schema definition for ThemeResponse
```markdown
## Schema: ThemeResponse
Schema definition for ThemeResponse
**Type:** object
- **success** (boolean) (required)
- **themeId** (string) (required)
- **name** (string) (required)
- **styles** (object) (required): Flat map of style attributes, matching the attribute names accepted by the LMX `` tag. Only keys with a value set on the theme are returned; all keys are optional.
- **backgroundColor** (string)
- **backgroundXPadding** (number)
- **backgroundYPadding** (number)
- **bodyColor** (string)
- **bodyXPadding** (number)
- **bodyYPadding** (number)
- **bodyFontFamily** (string)
- **bodyFontCategory** (string)
- **borderColor** (string)
- **borderWidth** (number)
- **borderRadius** (number)
- **buttonBodyColor** (string)
- **buttonBodyXPadding** (number)
- **buttonBodyYPadding** (number)
- **buttonBorderColor** (string)
- **buttonBorderWidth** (number)
- **buttonBorderRadius** (number)
- **buttonTextColor** (string)
- **buttonTextFormat** (number)
- **buttonTextFontSize** (number)
- **dividerColor** (string)
- **dividerBorderWidth** (number)
- **textBaseColor** (string)
- **textBaseFontSize** (number)
- **textBaseLineHeight** (number)
- **textBaseLetterSpacing** (number)
- **textLinkColor** (string)
- **heading1Color** (string)
- **heading1FontSize** (number)
- **heading1LineHeight** (number)
- **heading1LetterSpacing** (number)
- **heading2Color** (string)
- **heading2FontSize** (number)
- **heading2LineHeight** (number)
- **heading2LetterSpacing** (number)
- **heading3Color** (string)
- **heading3FontSize** (number)
- **heading3LineHeight** (number)
- **heading3LetterSpacing** (number)
- **isDefault** (boolean) (required): Whether this theme is the team's default.
- **createdAt** (string) (required): ISO 8601 timestamp.
- **updatedAt** (string) (required): ISO 8601 timestamp.
```
--------------------------------
### Schema: Theme
Source: https://app.loops.so/openapi.json
Schema definition for Theme
```markdown
## Schema: Theme
Schema definition for Theme
**Type:** object
- **themeId** (string) (required)
- **name** (string) (required)
- **styles** (object) (required): Flat map of style attributes, matching the attribute names accepted by the LMX `` tag. Only keys with a value set on the theme are returned; all keys are optional.
- **backgroundColor** (string)
- **backgroundXPadding** (number)
- **backgroundYPadding** (number)
- **bodyColor** (string)
- **bodyXPadding** (number)
- **bodyYPadding** (number)
- **bodyFontFamily** (string)
- **bodyFontCategory** (string)
- **borderColor** (string)
- **borderWidth** (number)
- **borderRadius** (number)
- **buttonBodyColor** (string)
- **buttonBodyXPadding** (number)
- **buttonBodyYPadding** (number)
- **buttonBorderColor** (string)
- **buttonBorderWidth** (number)
- **buttonBorderRadius** (number)
- **buttonTextColor** (string)
- **buttonTextFormat** (number)
- **buttonTextFontSize** (number)
- **dividerColor** (string)
- **dividerBorderWidth** (number)
- **textBaseColor** (string)
- **textBaseFontSize** (number)
- **textBaseLineHeight** (number)
- **textBaseLetterSpacing** (number)
- **textLinkColor** (string)
- **heading1Color** (string)
- **heading1FontSize** (number)
- **heading1LineHeight** (number)
- **heading1LetterSpacing** (number)
- **heading2Color** (string)
- **heading2FontSize** (number)
- **heading2LineHeight** (number)
- **heading2LetterSpacing** (number)
- **heading3Color** (string)
- **heading3FontSize** (number)
- **heading3LineHeight** (number)
- **heading3LetterSpacing** (number)
- **isDefault** (boolean) (required): Whether this theme is the team's default.
- **createdAt** (string) (required): ISO 8601 timestamp.
- **updatedAt** (string) (required): ISO 8601 timestamp.
```
--------------------------------
### Schema: ListComponentsResponse
Source: https://app.loops.so/openapi.json
Schema definition for ListComponentsResponse
```markdown
## Schema: ListComponentsResponse
Schema definition for ListComponentsResponse
**Type:** object
- **success** (boolean) (required)
- **pagination** (object) (required)
- **totalResults** (number)
- **returnedResults** (number)
- **perPage** (number)
- **totalPages** (number)
- **nextCursor** (string,null)
- **nextPage** (string,null)
- **data** (array (Component)) (required)
Array items:
- **componentId** (string) (required)
- **name** (string) (required)
- **lmx** (string) (required): The component body serialized as LMX.
```
--------------------------------
### Schema: Component
Source: https://app.loops.so/openapi.json
Schema definition for Component
```markdown
## Schema: Component
Schema definition for Component
**Type:** object
- **componentId** (string) (required)
- **name** (string) (required)
- **lmx** (string) (required): The component body serialized as LMX.
```
--------------------------------
### Schema: ListThemesResponse
Source: https://app.loops.so/openapi.json
Schema definition for ListThemesResponse
```markdown
## Schema: ListThemesResponse
Schema definition for ListThemesResponse
**Type:** object
- **success** (boolean) (required)
- **pagination** (object) (required)
- **totalResults** (number)
- **returnedResults** (number)
- **perPage** (number)
- **totalPages** (number)
- **nextCursor** (string,null)
- **nextPage** (string,null)
- **data** (array (Theme)) (required)
Array items:
- **themeId** (string) (required)
- **name** (string) (required)
- **styles** (object) (required): Flat map of style attributes, matching the attribute names accepted by the LMX `` tag. Only keys with a value set on the theme are returned; all keys are optional.
- **backgroundColor** (string)
- **backgroundXPadding** (number)
- **backgroundYPadding** (number)
- **bodyColor** (string)
- **bodyXPadding** (number)
- **bodyYPadding** (number)
- **bodyFontFamily** (string)
- **bodyFontCategory** (string)
- **borderColor** (string)
- **borderWidth** (number)
- **borderRadius** (number)
- **buttonBodyColor** (string)
- **buttonBodyXPadding** (number)
- **buttonBodyYPadding** (number)
- **buttonBorderColor** (string)
- **buttonBorderWidth** (number)
- **buttonBorderRadius** (number)
- **buttonTextColor** (string)
- **buttonTextFormat** (number)
- **buttonTextFontSize** (number)
- **dividerColor** (string)
- **dividerBorderWidth** (number)
- **textBaseColor** (string)
- **textBaseFontSize** (number)
- **textBaseLineHeight** (number)
- **textBaseLetterSpacing** (number)
- **textLinkColor** (string)
- **heading1Color** (string)
- **heading1FontSize** (number)
- **heading1LineHeight** (number)
- **heading1LetterSpacing** (number)
- **heading2Color** (string)
- **heading2FontSize** (number)
- **heading2LineHeight** (number)
- **heading2LetterSpacing** (number)
- **heading3Color** (string)
- **heading3FontSize** (number)
- **heading3LineHeight** (number)
- **heading3LetterSpacing** (number)
- **isDefault** (boolean) (required): Whether this theme is the team's default.
- **createdAt** (string) (required): ISO 8601 timestamp.
- **updatedAt** (string) (required): ISO 8601 timestamp.
```
--------------------------------
### Security: apiKey
Source: https://app.loops.so/openapi.json
Security scheme: apiKey
```markdown
## Security: apiKey
**Description:** Security scheme: apiKey
**Type:** http
**Scheme:** bearer
```
--------------------------------
### Schema: ComponentResponse
Source: https://app.loops.so/openapi.json
Schema definition for ComponentResponse
```markdown
## Schema: ComponentResponse
Schema definition for ComponentResponse
**Type:** object
- **success** (boolean) (required)
- **componentId** (string) (required)
- **name** (string) (required)
- **lmx** (string) (required): The component body serialized as LMX.
```
--------------------------------
### POST /transactional
Source: https://app.loops.so/openapi.json
Send a transactional email to a contact.
Please [email us](mailto:help@loops.so) to enable attachments on your account before using them with the API.
```markdown
### Parameters
- **Idempotency-Key** (string, header, optional): Include a unique ID for this request (maximum 100 characters) to avoid duplicate emails. [More info](https://loops.so/docs/api-reference/send-transactional-email#param-idempotency-key)
### Request Body
**Content-Type:** application/json
- **email** (string) (required)
- **transactionalId** (string) (required): The ID of the transactional email to send.
- **addToAudience** (boolean): If `true`, a contact will be created in your audience using the `email` value (if a matching contact doesn't already exist).
- **dataVariables** (object): An object containing contact data as defined by the data variables added to the transactional email template.
- **attachments** (array (object)): A list containing file objects to be sent along with an email message.
Array items:
- **filename** (string) (required): The name of the file, shown in email clients.
- **contentType** (string) (required): The MIME type of the file.
- **data** (string) (required): The base64-encoded content of the file.
### Responses
#### 200 - Successful send.
**TransactionalSuccessResponse**
- **success** (boolean) (required)
#### 400 - Bad request (e.g. transactional email is not published).
- **success** (boolean) (required)
- **message** (string) (required)
#### 404 - Transactional email not found.
**TransactionalFailure3Response**
- **success** (boolean) (required)
- **message** (string) (required)
- **error** (object) (required)
- **path** (string)
- **message** (string)
#### 405 - Wrong HTTP request method.
Wrong HTTP request method.
#### 409 - Idempotency key has been used.
**IdempotencyKeyFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
### Example Usage
```bash
curl -X POST "https://app.loops.so/api/v1/transactional" \
-H "Content-Type: application/json" \
-d '{
"email": "string",
"transactionalId": "string",
"addToAudience": "true",
"dataVariables": "value",
"attachments": [
{
"filename": "string",
"contentType": "string",
"data": "string"
}
]
}'
```
```
--------------------------------
### POST /events/send
Source: https://app.loops.so/openapi.json
Send events to trigger emails in Loops.
```markdown
### Parameters
- **Idempotency-Key** (string, header, optional): Include a unique ID for this request (maximum 100 characters) to avoid duplicate events. [More info](https://loops.so/docs/api-reference/send-event#param-idempotency-key)
### Request Body
**Content-Type:** application/json
- **email** (string)
- **userId** (string)
- **eventName** (string) (required)
- **eventProperties** (object): An object containing event property data for the event, available in emails sent by the event.
- **mailingLists** (object): An object of mailing list IDs and boolean subscription statuses.
### Responses
#### 200 - Successful send.
**EventSuccessResponse**
- **success** (boolean) (required)
#### 400 - Bad request (e.g. `eventName` is missing).
**EventFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
#### 405 - Wrong HTTP request method.
Wrong HTTP request method.
#### 409 - Idempotency key has been used.
**IdempotencyKeyFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
### Example Usage
```bash
curl -X POST "https://app.loops.so/api/v1/events/send" \
-H "Content-Type: application/json" \
-d '{
"email": "string",
"userId": "string",
"eventName": "string",
"eventProperties": "value",
"mailingLists": "value"
}'
```
```
--------------------------------
### Schema: ThemeFailureResponse
Source: https://app.loops.so/openapi.json
Schema definition for ThemeFailureResponse
```markdown
## Schema: ThemeFailureResponse
Schema definition for ThemeFailureResponse
**Type:** object
- **success** (boolean) (required)
- **message** (string) (required)
```
--------------------------------
### Schema: EventSuccessResponse
Source: https://app.loops.so/openapi.json
Schema definition for EventSuccessResponse
```markdown
## Schema: EventSuccessResponse
Schema definition for EventSuccessResponse
**Type:** object
- **success** (boolean) (required)
```
--------------------------------
### POST /contacts/delete
Source: https://app.loops.so/openapi.json
Delete a contact by `email` or `userId`.
```markdown
### Request Body
**Content-Type:** application/json
- **email** (string) (required)
- **userId** (string) (required)
### Responses
#### 200 - Successful delete.
**ContactDeleteResponse**
- **success** (boolean) (required)
- **message** (string) (required)
#### 400 - Bad request (e.g. `email` and `userId` are both provided).
**ContactFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
#### 404 - Contact not found.
**ContactFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
#### 405 - Wrong HTTP request method.
Wrong HTTP request method.
### Example Usage
```bash
curl -X POST "https://app.loops.so/api/v1/contacts/delete" \
-H "Content-Type: application/json" \
-d '{
"email": "string",
"userId": "string"
}'
```
```
--------------------------------
### Schema: ContactProperty
Source: https://app.loops.so/openapi.json
Schema definition for ContactProperty
```markdown
## Schema: ContactProperty
Schema definition for ContactProperty
**Type:** object
- **key** (string) (required)
- **label** (string) (required)
- **type** (string) (required)
```
--------------------------------
### API Overview: Loops OpenAPI Spec
Source: https://app.loops.so/openapi.json
This is the OpenAPI Spec for the [Loops API](https://loops.so/docs/api).
```yaml
# Loops OpenAPI Spec
# Version: 1.8.0
This is the OpenAPI Spec for the [Loops API](https://loops.so/docs/api).
# Base URL: https://app.loops.so/api/v1
```
--------------------------------
### Schema: ContactSuccessResponse
Source: https://app.loops.so/openapi.json
Schema definition for ContactSuccessResponse
```markdown
## Schema: ContactSuccessResponse
Schema definition for ContactSuccessResponse
**Type:** object
- **success** (boolean) (required)
- **id** (string) (required)
```
--------------------------------
### Schema: MailingList
Source: https://app.loops.so/openapi.json
Schema definition for MailingList
```markdown
## Schema: MailingList
Schema definition for MailingList
**Type:** object
- **id** (string) (required)
- **name** (string) (required)
- **description** (string) (required)
- **isPublic** (boolean) (required)
```
--------------------------------
### Schema: Contact
Source: https://app.loops.so/openapi.json
Schema definition for Contact
```markdown
## Schema: Contact
Schema definition for Contact
**Type:** object
- **id** (string)
- **email** (string)
- **firstName** (string,null)
- **lastName** (string,null)
- **source** (string)
- **subscribed** (boolean)
- **userGroup** (string)
- **userId** (string,null)
- **mailingLists** (object): An object of mailing list IDs and boolean subscription statuses.
- **optInStatus** (string,null): Double opt-in status. ("accepted"|"pending"|"rejected"|"null")
```
--------------------------------
### Schema: ComponentFailureResponse
Source: https://app.loops.so/openapi.json
Schema definition for ComponentFailureResponse
```markdown
## Schema: ComponentFailureResponse
Schema definition for ComponentFailureResponse
**Type:** object
- **success** (boolean) (required)
- **message** (string) (required)
```
--------------------------------
### Schema: TransactionalSuccessResponse
Source: https://app.loops.so/openapi.json
Schema definition for TransactionalSuccessResponse
```markdown
## Schema: TransactionalSuccessResponse
Schema definition for TransactionalSuccessResponse
**Type:** object
- **success** (boolean) (required)
```
--------------------------------
### Schema: ContactDeleteResponse
Source: https://app.loops.so/openapi.json
Schema definition for ContactDeleteResponse
```markdown
## Schema: ContactDeleteResponse
Schema definition for ContactDeleteResponse
**Type:** object
- **success** (boolean) (required)
- **message** (string) (required)
```
--------------------------------
### Schema: IdempotencyKeyFailureResponse
Source: https://app.loops.so/openapi.json
Schema definition for IdempotencyKeyFailureResponse
```markdown
## Schema: IdempotencyKeyFailureResponse
Schema definition for IdempotencyKeyFailureResponse
**Type:** object
- **success** (boolean) (required)
- **message** (string) (required)
```
--------------------------------
### Schema: ContactPropertySuccessResponse
Source: https://app.loops.so/openapi.json
Schema definition for ContactPropertySuccessResponse
```markdown
## Schema: ContactPropertySuccessResponse
Schema definition for ContactPropertySuccessResponse
**Type:** object
- **success** (boolean) (required)
```
--------------------------------
### Schema: EventRequest
Source: https://app.loops.so/openapi.json
Schema definition for EventRequest
```markdown
## Schema: EventRequest
Schema definition for EventRequest
**Type:** object
- **email** (string)
- **userId** (string)
- **eventName** (string) (required)
- **eventProperties** (object): An object containing event property data for the event, available in emails sent by the event.
- **mailingLists** (object): An object of mailing list IDs and boolean subscription statuses.
```
--------------------------------
### Schema: ListTransactionalsResponse
Source: https://app.loops.so/openapi.json
Schema definition for ListTransactionalsResponse
```markdown
## Schema: ListTransactionalsResponse
Schema definition for ListTransactionalsResponse
**Type:** object
- **pagination** (object)
- **totalResults** (number)
- **returnedResults** (number)
- **perPage** (number)
- **totalPages** (number)
- **nextCursor** (string,null)
- **nextPage** (string,null)
- **data** (array (TransactionalEmail))
Array items:
- **id** (string) (required)
- **name** (string) (required)
- **lastUpdated** (string) (required)
- **dataVariables** (array) (required)
```
--------------------------------
### Schema: TransactionalEmail
Source: https://app.loops.so/openapi.json
Schema definition for TransactionalEmail
```markdown
## Schema: TransactionalEmail
Schema definition for TransactionalEmail
**Type:** object
- **id** (string) (required)
- **name** (string) (required)
- **lastUpdated** (string) (required)
- **dataVariables** (array) (required)
```
--------------------------------
### Schema: ContactPropertyCreateRequest
Source: https://app.loops.so/openapi.json
Schema definition for ContactPropertyCreateRequest
```markdown
## Schema: ContactPropertyCreateRequest
Schema definition for ContactPropertyCreateRequest
**Type:** object
- **name** (string) (required)
- **type** (string) (required)
```
--------------------------------
### Schema: EventFailureResponse
Source: https://app.loops.so/openapi.json
Schema definition for EventFailureResponse
```markdown
## Schema: EventFailureResponse
Schema definition for EventFailureResponse
**Type:** object
- **success** (boolean) (required)
- **message** (string) (required)
```
--------------------------------
### Schema: ContactRequest
Source: https://app.loops.so/openapi.json
Schema definition for ContactRequest
```markdown
## Schema: ContactRequest
Schema definition for ContactRequest
**Type:** object
- **email** (string) (required)
- **firstName** (string)
- **lastName** (string)
- **subscribed** (boolean)
- **userGroup** (string)
- **userId** (string)
- **mailingLists** (object): An object of mailing list IDs and boolean subscription statuses.
```
--------------------------------
### Schema: ContactPropertyFailureResponse
Source: https://app.loops.so/openapi.json
Schema definition for ContactPropertyFailureResponse
```markdown
## Schema: ContactPropertyFailureResponse
Schema definition for ContactPropertyFailureResponse
**Type:** object
- **success** (boolean) (required)
- **message** (string) (required)
```
--------------------------------
### Schema: ContactUpdateRequest
Source: https://app.loops.so/openapi.json
Schema definition for ContactUpdateRequest
```markdown
## Schema: ContactUpdateRequest
Schema definition for ContactUpdateRequest
**Type:** object
- **email** (string)
- **firstName** (string)
- **lastName** (string)
- **subscribed** (boolean)
- **userGroup** (string)
- **userId** (string)
- **mailingLists** (object): An object of mailing list IDs and boolean subscription statuses.
```
--------------------------------
### Schema: ContactFailureResponse
Source: https://app.loops.so/openapi.json
Schema definition for ContactFailureResponse
```markdown
## Schema: ContactFailureResponse
Schema definition for ContactFailureResponse
**Type:** object
- **success** (boolean) (required)
- **message** (string) (required)
```
--------------------------------
### Schema: TransactionalRequest
Source: https://app.loops.so/openapi.json
Schema definition for TransactionalRequest
```markdown
## Schema: TransactionalRequest
Schema definition for TransactionalRequest
**Type:** object
- **email** (string) (required)
- **transactionalId** (string) (required): The ID of the transactional email to send.
- **addToAudience** (boolean): If `true`, a contact will be created in your audience using the `email` value (if a matching contact doesn't already exist).
- **dataVariables** (object): An object containing contact data as defined by the data variables added to the transactional email template.
- **attachments** (array (object)): A list containing file objects to be sent along with an email message.
Array items:
- **filename** (string) (required): The name of the file, shown in email clients.
- **contentType** (string) (required): The MIME type of the file.
- **data** (string) (required): The base64-encoded content of the file.
```
--------------------------------
### PUT /contacts/update
Source: https://app.loops.so/openapi.json
Update a contact by `email` or `userId`. You must provide one of these parameters.
If you want to update a contact’s email address, the contact will first need a `userId` value. You can then make a request containing the userId field along with an updated email address.
```markdown
### Request Body
**Content-Type:** application/json
- **email** (string)
- **firstName** (string)
- **lastName** (string)
- **subscribed** (boolean)
- **userGroup** (string)
- **userId** (string)
- **mailingLists** (object): An object of mailing list IDs and boolean subscription statuses.
### Responses
#### 200 - Successful update.
**ContactSuccessResponse**
- **success** (boolean) (required)
- **id** (string) (required)
#### 400 - Bad request (e.g. `email` or `userId` are missing).
**ContactFailureResponse**
- **success** (boolean) (required)
- **message** (string) (required)
#### 405 - Wrong HTTP request method.
Wrong HTTP request method.
### Example Usage
```bash
curl -X PUT "https://app.loops.so/api/v1/contacts/update" \
-H "Content-Type: application/json" \
-d '{
"email": "string",
"firstName": "string",
"lastName": "string",
"subscribed": "true",
"userGroup": "string",
"userId": "string",
"mailingLists": "value"
}'
```
```
--------------------------------
### Schema: ContactSuppressionStatusResponse
Source: https://app.loops.so/openapi.json
Schema definition for ContactSuppressionStatusResponse
```markdown
## Schema: ContactSuppressionStatusResponse
Schema definition for ContactSuppressionStatusResponse
**Type:** object
- **contact** (object) (required)
- **id** (string) (required)
- **email** (string) (required)
- **userId** (string,null) (required)
- **isSuppressed** (boolean) (required)
- **removalQuota** (object) (required)
- **limit** (number) (required)
- **remaining** (number) (required)
```
--------------------------------
### Schema: TransactionalFailure5Response
Source: https://app.loops.so/openapi.json
Schema definition for TransactionalFailure5Response
```markdown
## Schema: TransactionalFailure5Response
Schema definition for TransactionalFailure5Response
**Type:** object
- **success** (boolean) (required)
- **message** (string) (required)
- **error** (object) (required)
- **path** (string)
- **message** (string)
- **transactionalId** (string) (required)
```
--------------------------------
### Schema: ContactDeleteRequest
Source: https://app.loops.so/openapi.json
Schema definition for ContactDeleteRequest
```markdown
## Schema: ContactDeleteRequest
Schema definition for ContactDeleteRequest
**Type:** object
- **email** (string) (required)
- **userId** (string) (required)
```