@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api BulkSMS JSON REST API
@base https://api.bulksms.com/v1
@version 1.1.0
@auth basic
@endpoints 15
@toc webhooks(5), profile(1), messages(5), blocked-numbers(2), credit(1), rmm(1)

@group webhooks
@endpoint POST /webhooks
@required {body: map}
@returns(200)
@errors {400}

@endpoint GET /webhooks
@returns(200)

@endpoint GET /webhooks/{id}
@returns(200)
@errors {400, 404}

@endpoint POST /webhooks/{id}
@required {body: map}
@returns(200)
@errors {404}

@endpoint DELETE /webhooks/{id}
@returns(200)
@errors {404}

@endgroup

@group profile
@endpoint GET /profile
@returns(200)

@endgroup

@group messages
@endpoint POST /messages
@required {body: [map]}
@optional {deduplication-id: any, auto-unicode: any, schedule-date: any, schedule-description: any}
@returns(201)
@errors {400, 403}

@endpoint GET /messages
@optional {limit: any, filter: any, sortOrder: any}
@returns(200)
@errors {400}

@endpoint GET /messages/send
@required {to: any, body: any}
@optional {deduplication-id: any}
@returns(201)
@errors {400, 403}

@endpoint GET /messages/{id}/relatedReceivedMessages
@required {id: any}
@returns(200)
@errors {400}

@endpoint GET /messages/{id}
@required {id: any}
@returns(200)
@errors {400, 404}

@endgroup

@group blocked-numbers
@endpoint POST /blocked-numbers
@required {body: [str]}
@returns(200)

@endpoint GET /blocked-numbers
@optional {min-id: any, limit: any}
@returns(200)

@endgroup

@group credit
@endpoint POST /credit/transfer
@required {body: map}
@returns(200)
@errors {400, 403}

@endgroup

@group rmm
@endpoint POST /rmm/pre-sign-attachment
@required {body: map}
@returns(200)

@endgroup

@end
