OAIWebhookControllerApi
All URIs are relative to https://api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
createAccountWebhook | POST /webhooks | Attach a WebHook URL to an inbox |
createWebhook | POST /inboxes/{inboxId}/webhooks | Attach a WebHook URL to an inbox |
createWebhookForPhoneNumber | POST /phone/numbers/{phoneNumberId}/webhooks | Attach a WebHook URL to a phone number |
deleteAllWebhooks | DELETE /webhooks | Delete all webhooks |
deleteWebhook | DELETE /inboxes/{inboxId}/webhooks/{webhookId} | Delete and disable a Webhook for an Inbox |
deleteWebhookById | DELETE /webhooks/{webhookId} | Delete a webhook |
getAllWebhookResults | GET /webhooks/results | Get results for all webhooks |
getAllWebhooks | GET /webhooks/paginated | List Webhooks Paginated |
getInboxWebhooksPaginated | GET /inboxes/{inboxId}/webhooks/paginated | Get paginated webhooks for an Inbox |
getJsonSchemaForWebhookEvent | POST /webhooks/schema | |
getJsonSchemaForWebhookPayload | POST /webhooks/{webhookId}/schema | |
getPhoneNumberWebhooksPaginated | GET /phone/numbers/{phoneId}/webhooks/paginated | Get paginated webhooks for a phone number |
getTestWebhookPayload | GET /webhooks/test | |
getTestWebhookPayloadBounce | GET /webhooks/test/email-bounce-payload | |
getTestWebhookPayloadBounceRecipient | GET /webhooks/test/email-bounce-recipient-payload | |
getTestWebhookPayloadEmailOpened | GET /webhooks/test/email-opened-payload | |
getTestWebhookPayloadEmailRead | GET /webhooks/test/email-read-payload | |
getTestWebhookPayloadForWebhook | POST /webhooks/{webhookId}/example | |
getTestWebhookPayloadNewAttachment | GET /webhooks/test/new-attachment-payload | Get webhook test payload for new attachment event |
getTestWebhookPayloadNewContact | GET /webhooks/test/new-contact-payload | Get webhook test payload for new contact event |
getTestWebhookPayloadNewEmail | GET /webhooks/test/new-email-payload | Get webhook test payload for new email event |
getWebhook | GET /webhooks/{webhookId} | Get a webhook |
getWebhookResult | GET /webhooks/results/{webhookResultId} | Get a webhook result for a webhook |
getWebhookResults | GET /webhooks/{webhookId}/results | Get a webhook results for a webhook |
getWebhookResultsUnseenErrorCount | GET /webhooks/results/unseen-count | Get count of unseen webhook results with error status |
getWebhooks | GET /inboxes/{inboxId}/webhooks | Get all webhooks for an Inbox |
redriveWebhookResult | POST /webhooks/results/{webhookResultId}/redrive | Get a webhook result and try to resend the original webhook payload |
sendTestData | POST /webhooks/{webhookId}/test | Send webhook test data |
updateWebhookHeaders | PUT /webhooks/{webhookId}/headers | Update a webhook request headers |
verifyWebhookSignature | POST /webhooks/verify | Verify a webhook payload signature |
-(NSURLSessionTask*) createAccountWebhookWithCreateWebhookOptions: (OAICreateWebhookOptions*) createWebhookOptions
completionHandler: (void (^)(OAIWebhookDto* output, NSError* error)) handler;
Attach a WebHook URL to an inbox
Get notified of account level events such as bounce and bounce recipient.
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
OAICreateWebhookOptions* createWebhookOptions = [[OAICreateWebhookOptions alloc] init]; //
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Attach a WebHook URL to an inbox
[apiInstance createAccountWebhookWithCreateWebhookOptions:createWebhookOptions
completionHandler: ^(OAIWebhookDto* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->createAccountWebhook: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
createWebhookOptions | OAICreateWebhookOptions* |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) createWebhookWithInboxId: (NSString*) inboxId
createWebhookOptions: (OAICreateWebhookOptions*) createWebhookOptions
completionHandler: (void (^)(OAIWebhookDto* output, NSError* error)) handler;
Attach a WebHook URL to an inbox
Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* inboxId = @"inboxId_example"; //
OAICreateWebhookOptions* createWebhookOptions = [[OAICreateWebhookOptions alloc] init]; //
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Attach a WebHook URL to an inbox
[apiInstance createWebhookWithInboxId:inboxId
createWebhookOptions:createWebhookOptions
completionHandler: ^(OAIWebhookDto* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->createWebhook: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | NSString* | ||
createWebhookOptions | OAICreateWebhookOptions* |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) createWebhookForPhoneNumberWithPhoneNumberId: (NSString*) phoneNumberId
createWebhookOptions: (OAICreateWebhookOptions*) createWebhookOptions
completionHandler: (void (^)(OAIWebhookDto* output, NSError* error)) handler;
Attach a WebHook URL to a phone number
Get notified whenever a phone number receives an SMS via a WebHook URL.
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* phoneNumberId = @"phoneNumberId_example"; //
OAICreateWebhookOptions* createWebhookOptions = [[OAICreateWebhookOptions alloc] init]; //
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Attach a WebHook URL to a phone number
[apiInstance createWebhookForPhoneNumberWithPhoneNumberId:phoneNumberId
createWebhookOptions:createWebhookOptions
completionHandler: ^(OAIWebhookDto* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->createWebhookForPhoneNumber: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
phoneNumberId | NSString* | ||
createWebhookOptions | OAICreateWebhookOptions* |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) deleteAllWebhooksWithBefore: (NSDate*) before
completionHandler: (void (^)(NSError* error)) handler;
Delete all webhooks
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSDate* before = @"2013-10-20T19:20:30+01:00"; // before (optional)
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Delete all webhooks
[apiInstance deleteAllWebhooksWithBefore:before
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->deleteAllWebhooks: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
before | NSDate* | before | [optional] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) deleteWebhookWithInboxId: (NSString*) inboxId
webhookId: (NSString*) webhookId
completionHandler: (void (^)(NSError* error)) handler;
Delete and disable a Webhook for an Inbox
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* inboxId = @"inboxId_example"; //
NSString* webhookId = @"webhookId_example"; //
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Delete and disable a Webhook for an Inbox
[apiInstance deleteWebhookWithInboxId:inboxId
webhookId:webhookId
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->deleteWebhook: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | NSString* | ||
webhookId | NSString* |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) deleteWebhookByIdWithWebhookId: (NSString*) webhookId
completionHandler: (void (^)(NSError* error)) handler;
Delete a webhook
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* webhookId = @"webhookId_example"; //
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Delete a webhook
[apiInstance deleteWebhookByIdWithWebhookId:webhookId
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->deleteWebhookById: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhookId | NSString* |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getAllWebhookResultsWithPage: (NSNumber*) page
size: (NSNumber*) size
sort: (NSString*) sort
searchFilter: (NSString*) searchFilter
since: (NSDate*) since
before: (NSDate*) before
unseenOnly: (NSNumber*) unseenOnly
completionHandler: (void (^)(OAIPageWebhookResult* output, NSError* error)) handler;
Get results for all webhooks
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSNumber* page = @0; // Optional page in list pagination (optional) (default to @0)
NSNumber* size = @20; // Optional page size in list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")
NSString* searchFilter = @"searchFilter_example"; // Optional search filter (optional)
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Filter by created at after the given timestamp (optional)
NSDate* before = @"2013-10-20T19:20:30+01:00"; // Filter by created at before the given timestamp (optional)
NSNumber* unseenOnly = @56; // Filter for unseen exceptions only (optional)
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Get results for all webhooks
[apiInstance getAllWebhookResultsWithPage:page
size:size
sort:sort
searchFilter:searchFilter
since:since
before:before
unseenOnly:unseenOnly
completionHandler: ^(OAIPageWebhookResult* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getAllWebhookResults: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
page | NSNumber* | Optional page in list pagination | [optional] [default to @0] |
size | NSNumber* | Optional page size in list pagination | [optional] [default to @20] |
sort | NSString* | Optional createdAt sort direction ASC or DESC | [optional] [default to @"ASC"] |
searchFilter | NSString* | Optional search filter | [optional] |
since | NSDate* | Filter by created at after the given timestamp | [optional] |
before | NSDate* | Filter by created at before the given timestamp | [optional] |
unseenOnly | NSNumber* | Filter for unseen exceptions only | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getAllWebhooksWithPage: (NSNumber*) page
size: (NSNumber*) size
sort: (NSString*) sort
searchFilter: (NSString*) searchFilter
since: (NSDate*) since
inboxId: (NSString*) inboxId
phoneId: (NSString*) phoneId
before: (NSDate*) before
completionHandler: (void (^)(OAIPageWebhookProjection* output, NSError* error)) handler;
List Webhooks Paginated
List webhooks in paginated form. Allows for page , page size, and sort direction.
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSNumber* page = @0; // Optional page in list pagination (optional) (default to @0)
NSNumber* size = @20; // Optional page size for paginated result list. (optional) (default to @20)
NSString* sort = @"DESC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"DESC")
NSString* searchFilter = @"searchFilter_example"; // Optional search filter (optional)
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Filter by created at after the given timestamp (optional)
NSString* inboxId = @"inboxId_example"; // Filter by inboxId (optional)
NSString* phoneId = @"phoneId_example"; // Filter by phoneId (optional)
NSDate* before = @"2013-10-20T19:20:30+01:00"; // Filter by created at before the given timestamp (optional)
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// List Webhooks Paginated
[apiInstance getAllWebhooksWithPage:page
size:size
sort:sort
searchFilter:searchFilter
since:since
inboxId:inboxId
phoneId:phoneId
before:before
completionHandler: ^(OAIPageWebhookProjection* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getAllWebhooks: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
page | NSNumber* | Optional page in list pagination | [optional] [default to @0] |
size | NSNumber* | Optional page size for paginated result list. | [optional] [default to @20] |
sort | NSString* | Optional createdAt sort direction ASC or DESC | [optional] [default to @"DESC"] |
searchFilter | NSString* | Optional search filter | [optional] |
since | NSDate* | Filter by created at after the given timestamp | [optional] |
inboxId | NSString* | Filter by inboxId | [optional] |
phoneId | NSString* | Filter by phoneId | [optional] |
before | NSDate* | Filter by created at before the given timestamp | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getInboxWebhooksPaginatedWithInboxId: (NSString*) inboxId
page: (NSNumber*) page
size: (NSNumber*) size
sort: (NSString*) sort
searchFilter: (NSString*) searchFilter
since: (NSDate*) since
before: (NSDate*) before
completionHandler: (void (^)(OAIPageWebhookProjection* output, NSError* error)) handler;
Get paginated webhooks for an Inbox
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* inboxId = @"inboxId_example"; //
NSNumber* page = @0; // Optional page in list pagination (optional) (default to @0)
NSNumber* size = @20; // Optional page size in list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")
NSString* searchFilter = @"searchFilter_example"; // Optional search filter (optional)
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Filter by created at after the given timestamp (optional)
NSDate* before = @"2013-10-20T19:20:30+01:00"; // Filter by created at before the given timestamp (optional)
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Get paginated webhooks for an Inbox
[apiInstance getInboxWebhooksPaginatedWithInboxId:inboxId
page:page
size:size
sort:sort
searchFilter:searchFilter
since:since
before:before
completionHandler: ^(OAIPageWebhookProjection* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getInboxWebhooksPaginated: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | NSString* | ||
page | NSNumber* | Optional page in list pagination | [optional] [default to @0] |
size | NSNumber* | Optional page size in list pagination | [optional] [default to @20] |
sort | NSString* | Optional createdAt sort direction ASC or DESC | [optional] [default to @"ASC"] |
searchFilter | NSString* | Optional search filter | [optional] |
since | NSDate* | Filter by created at after the given timestamp | [optional] |
before | NSDate* | Filter by created at before the given timestamp | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getJsonSchemaForWebhookEventWithEvent: (NSString*) event
completionHandler: (void (^)(OAIJSONSchemaDto* output, NSError* error)) handler;
Get JSON Schema definition for webhook payload by event
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* event = @"event_example"; //
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
[apiInstance getJsonSchemaForWebhookEventWithEvent:event
completionHandler: ^(OAIJSONSchemaDto* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getJsonSchemaForWebhookEvent: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
event | NSString* |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getJsonSchemaForWebhookPayloadWithWebhookId: (NSString*) webhookId
completionHandler: (void (^)(OAIJSONSchemaDto* output, NSError* error)) handler;
Get JSON Schema definition for webhook payload
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* webhookId = @"webhookId_example"; //
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
[apiInstance getJsonSchemaForWebhookPayloadWithWebhookId:webhookId
completionHandler: ^(OAIJSONSchemaDto* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getJsonSchemaForWebhookPayload: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhookId | NSString* |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getPhoneNumberWebhooksPaginatedWithPhoneId: (NSString*) phoneId
page: (NSNumber*) page
size: (NSNumber*) size
sort: (NSString*) sort
since: (NSDate*) since
before: (NSDate*) before
completionHandler: (void (^)(OAIPageWebhookProjection* output, NSError* error)) handler;
Get paginated webhooks for a phone number
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* phoneId = @"phoneId_example"; //
NSNumber* page = @0; // Optional page in list pagination (optional) (default to @0)
NSNumber* size = @20; // Optional page size in list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Filter by created at after the given timestamp (optional)
NSDate* before = @"2013-10-20T19:20:30+01:00"; // Filter by created at before the given timestamp (optional)
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Get paginated webhooks for a phone number
[apiInstance getPhoneNumberWebhooksPaginatedWithPhoneId:phoneId
page:page
size:size
sort:sort
since:since
before:before
completionHandler: ^(OAIPageWebhookProjection* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getPhoneNumberWebhooksPaginated: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
phoneId | NSString* | ||
page | NSNumber* | Optional page in list pagination | [optional] [default to @0] |
size | NSNumber* | Optional page size in list pagination | [optional] [default to @20] |
sort | NSString* | Optional createdAt sort direction ASC or DESC | [optional] [default to @"ASC"] |
since | NSDate* | Filter by created at after the given timestamp | [optional] |
before | NSDate* | Filter by created at before the given timestamp | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getTestWebhookPayloadWithEventName: (NSString*) eventName
completionHandler: (void (^)(OAIAbstractWebhookPayload* output, NSError* error)) handler;
Get test webhook payload example. Response content depends on eventName passed. Uses EMAIL_RECEIVED
as default.
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* eventName = @"eventName_example"; // (optional)
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
[apiInstance getTestWebhookPayloadWithEventName:eventName
completionHandler: ^(OAIAbstractWebhookPayload* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getTestWebhookPayload: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
eventName | NSString* | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getTestWebhookPayloadBounceWithCompletionHandler:
(void (^)(OAIWebhookBouncePayload* output, NSError* error)) handler;
Get webhook test payload for bounce
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
[apiInstance getTestWebhookPayloadBounceWithCompletionHandler:
^(OAIWebhookBouncePayload* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getTestWebhookPayloadBounce: %@", error);
}
}];
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getTestWebhookPayloadBounceRecipientWithCompletionHandler:
(void (^)(OAIWebhookBounceRecipientPayload* output, NSError* error)) handler;
Get webhook test payload for bounce recipient
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
[apiInstance getTestWebhookPayloadBounceRecipientWithCompletionHandler:
^(OAIWebhookBounceRecipientPayload* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getTestWebhookPayloadBounceRecipient: %@", error);
}
}];
Parameters
This endpoint does not need any parameter.
Return type
OAIWebhookBounceRecipientPayload*
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getTestWebhookPayloadEmailOpenedWithCompletionHandler:
(void (^)(OAIWebhookEmailOpenedPayload* output, NSError* error)) handler;
Get webhook test payload for email opened event
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
[apiInstance getTestWebhookPayloadEmailOpenedWithCompletionHandler:
^(OAIWebhookEmailOpenedPayload* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getTestWebhookPayloadEmailOpened: %@", error);
}
}];
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getTestWebhookPayloadEmailReadWithCompletionHandler:
(void (^)(OAIWebhookEmailReadPayload* output, NSError* error)) handler;
Get webhook test payload for email opened event
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
[apiInstance getTestWebhookPayloadEmailReadWithCompletionHandler:
^(OAIWebhookEmailReadPayload* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getTestWebhookPayloadEmailRead: %@", error);
}
}];
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getTestWebhookPayloadForWebhookWithWebhookId: (NSString*) webhookId
completionHandler: (void (^)(OAIAbstractWebhookPayload* output, NSError* error)) handler;
Get example payload for webhook
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* webhookId = @"webhookId_example"; //
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
[apiInstance getTestWebhookPayloadForWebhookWithWebhookId:webhookId
completionHandler: ^(OAIAbstractWebhookPayload* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getTestWebhookPayloadForWebhook: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhookId | NSString* |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getTestWebhookPayloadNewAttachmentWithCompletionHandler:
(void (^)(OAIWebhookNewAttachmentPayload* output, NSError* error)) handler;
Get webhook test payload for new attachment event
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Get webhook test payload for new attachment event
[apiInstance getTestWebhookPayloadNewAttachmentWithCompletionHandler:
^(OAIWebhookNewAttachmentPayload* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getTestWebhookPayloadNewAttachment: %@", error);
}
}];
Parameters
This endpoint does not need any parameter.
Return type
OAIWebhookNewAttachmentPayload*
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getTestWebhookPayloadNewContactWithCompletionHandler:
(void (^)(OAIWebhookNewContactPayload* output, NSError* error)) handler;
Get webhook test payload for new contact event
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Get webhook test payload for new contact event
[apiInstance getTestWebhookPayloadNewContactWithCompletionHandler:
^(OAIWebhookNewContactPayload* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getTestWebhookPayloadNewContact: %@", error);
}
}];
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getTestWebhookPayloadNewEmailWithCompletionHandler:
(void (^)(OAIWebhookNewEmailPayload* output, NSError* error)) handler;
Get webhook test payload for new email event
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Get webhook test payload for new email event
[apiInstance getTestWebhookPayloadNewEmailWithCompletionHandler:
^(OAIWebhookNewEmailPayload* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getTestWebhookPayloadNewEmail: %@", error);
}
}];
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getWebhookWithWebhookId: (NSString*) webhookId
completionHandler: (void (^)(OAIWebhookDto* output, NSError* error)) handler;
Get a webhook
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* webhookId = @"webhookId_example"; //
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Get a webhook
[apiInstance getWebhookWithWebhookId:webhookId
completionHandler: ^(OAIWebhookDto* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getWebhook: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhookId | NSString* |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getWebhookResultWithWebhookResultId: (NSString*) webhookResultId
completionHandler: (void (^)(OAIWebhookResultDto* output, NSError* error)) handler;
Get a webhook result for a webhook
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* webhookResultId = @"webhookResultId_example"; // Webhook Result ID
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Get a webhook result for a webhook
[apiInstance getWebhookResultWithWebhookResultId:webhookResultId
completionHandler: ^(OAIWebhookResultDto* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getWebhookResult: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhookResultId | NSString* | Webhook Result ID |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getWebhookResultsWithWebhookId: (NSString*) webhookId
page: (NSNumber*) page
size: (NSNumber*) size
sort: (NSString*) sort
searchFilter: (NSString*) searchFilter
since: (NSDate*) since
before: (NSDate*) before
unseenOnly: (NSNumber*) unseenOnly
completionHandler: (void (^)(OAIPageWebhookResult* output, NSError* error)) handler;
Get a webhook results for a webhook
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* webhookId = @"webhookId_example"; // ID of webhook to get results for
NSNumber* page = @0; // Optional page in list pagination (optional) (default to @0)
NSNumber* size = @20; // Optional page size in list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")
NSString* searchFilter = @"searchFilter_example"; // Optional search filter (optional)
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Filter by created at after the given timestamp (optional)
NSDate* before = @"2013-10-20T19:20:30+01:00"; // Filter by created at before the given timestamp (optional)
NSNumber* unseenOnly = @56; // Filter for unseen exceptions only (optional)
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Get a webhook results for a webhook
[apiInstance getWebhookResultsWithWebhookId:webhookId
page:page
size:size
sort:sort
searchFilter:searchFilter
since:since
before:before
unseenOnly:unseenOnly
completionHandler: ^(OAIPageWebhookResult* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getWebhookResults: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhookId | NSString* | ID of webhook to get results for | |
page | NSNumber* | Optional page in list pagination | [optional] [default to @0] |
size | NSNumber* | Optional page size in list pagination | [optional] [default to @20] |
sort | NSString* | Optional createdAt sort direction ASC or DESC | [optional] [default to @"ASC"] |
searchFilter | NSString* | Optional search filter | [optional] |
since | NSDate* | Filter by created at after the given timestamp | [optional] |
before | NSDate* | Filter by created at before the given timestamp | [optional] |
unseenOnly | NSNumber* | Filter for unseen exceptions only | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getWebhookResultsUnseenErrorCountWithCompletionHandler:
(void (^)(OAIUnseenErrorCountDto* output, NSError* error)) handler;
Get count of unseen webhook results with error status
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Get count of unseen webhook results with error status
[apiInstance getWebhookResultsUnseenErrorCountWithCompletionHandler:
^(OAIUnseenErrorCountDto* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getWebhookResultsUnseenErrorCount: %@", error);
}
}];
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getWebhooksWithInboxId: (NSString*) inboxId
completionHandler: (void (^)(NSArray<OAIWebhookDto>* output, NSError* error)) handler;
Get all webhooks for an Inbox
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* inboxId = @"inboxId_example"; //
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Get all webhooks for an Inbox
[apiInstance getWebhooksWithInboxId:inboxId
completionHandler: ^(NSArray<OAIWebhookDto>* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->getWebhooks: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | NSString* |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) redriveWebhookResultWithWebhookResultId: (NSString*) webhookResultId
completionHandler: (void (^)(OAIWebhookRedriveResult* output, NSError* error)) handler;
Get a webhook result and try to resend the original webhook payload
Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method.
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* webhookResultId = @"webhookResultId_example"; // Webhook Result ID
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Get a webhook result and try to resend the original webhook payload
[apiInstance redriveWebhookResultWithWebhookResultId:webhookResultId
completionHandler: ^(OAIWebhookRedriveResult* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->redriveWebhookResult: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhookResultId | NSString* | Webhook Result ID |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) sendTestDataWithWebhookId: (NSString*) webhookId
completionHandler: (void (^)(OAIWebhookTestResult* output, NSError* error)) handler;
Send webhook test data
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* webhookId = @"webhookId_example"; //
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Send webhook test data
[apiInstance sendTestDataWithWebhookId:webhookId
completionHandler: ^(OAIWebhookTestResult* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->sendTestData: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhookId | NSString* |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) updateWebhookHeadersWithWebhookId: (NSString*) webhookId
webhookHeaders: (OAIWebhookHeaders*) webhookHeaders
completionHandler: (void (^)(OAIWebhookDto* output, NSError* error)) handler;
Update a webhook request headers
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* webhookId = @"webhookId_example"; //
OAIWebhookHeaders* webhookHeaders = [[OAIWebhookHeaders alloc] init]; //
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Update a webhook request headers
[apiInstance updateWebhookHeadersWithWebhookId:webhookId
webhookHeaders:webhookHeaders
completionHandler: ^(OAIWebhookDto* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->updateWebhookHeaders: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhookId | NSString* | ||
webhookHeaders | OAIWebhookHeaders* |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) verifyWebhookSignatureWithVerifyWebhookSignatureOptions: (OAIVerifyWebhookSignatureOptions*) verifyWebhookSignatureOptions
completionHandler: (void (^)(OAIVerifyWebhookSignatureResults* output, NSError* error)) handler;
Verify a webhook payload signature
Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server.
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
OAIVerifyWebhookSignatureOptions* verifyWebhookSignatureOptions = [[OAIVerifyWebhookSignatureOptions alloc] init]; //
OAIWebhookControllerApi*apiInstance = [[OAIWebhookControllerApi alloc] init];
// Verify a webhook payload signature
[apiInstance verifyWebhookSignatureWithVerifyWebhookSignatureOptions:verifyWebhookSignatureOptions
completionHandler: ^(OAIVerifyWebhookSignatureResults* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIWebhookControllerApi->verifyWebhookSignature: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
verifyWebhookSignatureOptions | OAIVerifyWebhookSignatureOptions* |
Return type
OAIVerifyWebhookSignatureResults*
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]