Mediana sms api (1.0.1)

Download OpenAPI specification:Download

mediana sms api doc
sdks for some programming languages is in out github at https://github.com/medianasms
api-key format: Authorization: "AccessKey your-api-key"

Authentication

ApiKeyAuth

Security Scheme Type API Key
Header parameter name: Authorization

auth

GetAuthorizedUser

get authorized user

Responses

200

ok

401

unauthorized

get /v1/auth/user
http://rest.medianasms.com/v1/auth/user

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "OK",
  • "code": 200,
  • "message": "Ok",
  • "data":
    {
    }
}

credit

GetCredit

get user credit

Responses

200

ok

401

unauthorized

get /v1/credit
http://rest.medianasms.com/v1/credit

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "OK",
  • "code": 200,
  • "message": "Ok",
  • "data":
    {
    }
}

messages

SendSMS

send SMS

Request Body schema: application/json

parameters

originator
required
string

your line number to send message from that

recipients
required
Array of strings

recipients number

message
required
string

message to send

Responses

200

ok

401

unauthorized

post /v1/messages
http://rest.medianasms.com/v1/messages

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "originator": "+9850002",
  • "recipients":
    [
    ],
  • "message": "mediana is awesome"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "value":
    {
    }
}

CreatePattern

create message pattern

Request Body schema: application/json

parameters

pattern
required
string

pattern template

is_shared
boolean

determine that pattern shared or not

Responses

200

ok

401

unauthorized

post /v1/messages/patterns
http://rest.medianasms.com/v1/messages/patterns

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "pattern": "Hello %name%",
  • "is_shared": false
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "value":
    {
    }
}

SendPattern

send pattern SMS

Request Body schema: application/json

parameters

pattern_code
required
string

pattern code

originator
required
string

your line number to send message from that

recipient
required
string

recipient number

values
required
object

pattern values

Responses

200

ok

401

unauthorized

post /v1/messages/patterns/send
http://rest.medianasms.com/v1/messages/patterns/send

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "pattern_code": "t2cfmnyo0c",
  • "originator": "+9850002",
  • "recipient": "+989123459900",
  • "values":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "value":
    {
    }
}

GetSMS

get a sms properties

path Parameters
bulk_id
required
integer <int64>
Example: 52738671

Responses

200

ok

401

unauthorized

get /v1/messages/{bulk_id}
http://rest.medianasms.com/v1/messages/{bulk_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "OK",
  • "code": 200,
  • "message": "Ok",
  • "data":
    {
    }
}

GetMessageRecipientsStatus

get a sms recipients status

path Parameters
bulk_id
required
integer <int64>
Example: 52738671
query Parameters
page
integer <uint64>
Example: page=0
limit
integer <int64>
Example: limit=10

Responses

200

ok

401

unauthorized

get /v1/messages/{bulk_id}/recipients
http://rest.medianasms.com/v1/messages/{bulk_id}/recipients

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "OK",
  • "code": 200,
  • "message": "Ok",
  • "data":
    {
    },
  • "meta":
    {
    }
}

FetchInboxMessages

fetch inbox messages

query Parameters
page
integer <uint64>
Example: page=0
limit
integer <int64>
Example: limit=10

Responses

200

ok

401

unauthorized

get /v1/messages/inbox
http://rest.medianasms.com/v1/messages/inbox

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "OK",
  • "code": 200,
  • "message": "Ok",
  • "data":
    {
    },
  • "meta":
    {
    }
}