| PUT | /subscription/{EventType} | Update your subscription to an event with a url we should post to | |
|---|---|---|---|
| PUT | /subscription | Update your subscription to an event with a url we should post to |
export class ApiServiceRequest implements IServiceRequest, IHasApiKey
{
/** @description The API Key required for authentication */
// @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
public ApiKey: string;
public constructor(init?: Partial<ApiServiceRequest>) { (Object as any).assign(this, init); }
}
export class ApiServiceResponse implements IServiceResponse
{
public Description: string;
public Heading: string;
public WasSuccessful: boolean;
public ModelState: Object;
public constructor(init?: Partial<ApiServiceResponse>) { (Object as any).assign(this, init); }
}
export enum WebhookSubscriptionEventType
{
MessageReceived = 1,
}
export class UpdateSubscription extends ApiServiceRequest implements ILogRequest
{
/** @description The event type being subscribed to */
// @ApiMember(Description="The event type being subscribed to", IsRequired=true)
public EventType: WebhookSubscriptionEventType;
/** @description The URL we should post the event data to */
// @ApiMember(Description="The URL we should post the event data to", IsRequired=true)
public SubscriptionUrl: string;
public constructor(init?: Partial<UpdateSubscription>) { super(init); (Object as any).assign(this, init); }
}
TypeScript UpdateSubscription DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /subscription/{EventType} HTTP/1.1
Host: galaxymobile.api.client.prod.86degrees.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
EventType: 1,
SubscriptionUrl: String,
ApiKey: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Description: String,
Heading: String,
WasSuccessful: False,
ModelState: {}
}