Sonjj API Documentation
Base URLs:
Authentication
- API Key (APIKeyHeader)
- Parameter Name: X-Api-Key, in: header. Every request requires the x-api-key header. This header you can log into https://my.sonjj.com and find it in the API section
Temp Mail API
Temporary Email API is an API service that allows users to create and manage temporary emails easily and automatically. This API provides a convenient solution for receiving temporary emails without registering a real email account.
GET
/v1/temp_email/create
( Create temporary email )
const headers = {
'Accept':'application/json',
'X-Api-Key':'API_KEY'
};
fetch('https://app.sonjj.com/v1/temp_email/create?email=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
query | string | true | none | |
expiry_minutes | query | integer | false | none |
Detailed descriptions
expiry_minutes:
The expiration time in minutes for the temporary email.
- If the value is less than 0, the email will be deleted.
- If the value is 0, the email will be refreshed.
- If the value is greater than 0, the email will be updated.
- The maximum value is 20160 (14 days).
Example responses
200 Response
{
"email": "string",
"expired_at": 0,
"action": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | CreateOut |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
GET
/v1/temp_email/inbox
( Get inbox )
const headers = {
'Accept':'application/json',
'X-Api-Key':'API_KEY'
};
fetch('https://app.sonjj.com/v1/temp_email/inbox?email=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
query | string | true | none |
Example responses
200 Response
{
"messages": [
{
"mid": "e998fa80-61b7-4108-a208-e41aede15212",
"textTo": "test@example.com",
"textFrom": "sonjj.com",
"textSubject": "Hello World!",
"textDate": "2024-04-24T10:05:52"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | InboxOut |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
GET
/v1/temp_email/message
( Get message )
const headers = {
'Accept':'application/json',
'X-Api-Key':'API_KEY'
};
fetch('https://app.sonjj.com/v1/temp_email/message?email=string&mid=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
query | string | true | none | |
mid | query | string | true | none |
Example responses
200 Response
{
"body": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | MessageOut |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
GET
/v1/temp_email/domains
( Get allowed domains )
const headers = {
'Accept':'application/json'
};
fetch('https://app.sonjj.com/v1/temp_email/domains',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Example responses
200 Response
{
"domains": [
"string"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | DomainsOut |
Temp Gmail API
Temporary Gmail API is an API service that allows users to use system-generated Gmail addresses to receive Opt messages, register accounts, subscribe to newsletters, and more. from other systems. We distribute this API on two platforms SonjjAPI and RapidAPI. At RapidAPI you can run API tests for free here
GET
/v1/temp_gmail/list
( List temporary gmail )
const headers = {
'Accept':'application/json',
'X-Api-Key':'API_KEY'
};
fetch('https://app.sonjj.com/v1/temp_gmail/list',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
page | query | integer | false | Page number |
limit | query | integer | false | Limit number |
type | query | string | false | Type of email (real or alias) |
password | query | string | false | Add a password to protect others from checking your message list |
Example responses
200 Response
{
"data": [
{
"email": "string",
"timestamp": 0
}
],
"pagination": {
"page": 0,
"limit": 0,
"total_count": 0,
"total_pages": 0
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | ListGmailOut |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
GET
/v1/temp_gmail/inbox
( Inbox temporary gmail )
const headers = {
'Accept':'application/json',
'X-Api-Key':'API_KEY'
};
fetch('https://app.sonjj.com/v1/temp_gmail/inbox?email=string×tamp=0',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
query | string | true | none | |
timestamp | query | integer | true | none |
Detailed descriptions
timestamp:
The API will retrieve messages after this time
Example responses
200 Response
{
"messages": [
{
"mid": "18f58c2ac459890a",
"textTo": "test@example.com",
"textFrom": "sonjj.com",
"textSubject": "Hello World!",
"textDate": "Thu, 09 May 2024 01:10:51 +0000 (UTC)"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | InboxGmailOut |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
GET
/v1/temp_gmail/message
( Message temporary gmail )
const headers = {
'Accept':'application/json',
'X-Api-Key':'API_KEY'
};
fetch('https://app.sonjj.com/v1/temp_gmail/message?email=string&mid=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
query | string | true | none | |
mid | query | string | true | none |
Example responses
200 Response
{
"body": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | MessageGmailOut |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
Temp Outlook API
GET
/v1/temp_outlook/list
( List temporary outlook )
const headers = {
'Accept':'application/json',
'X-Api-Key':'API_KEY'
};
fetch('https://app.sonjj.com/v1/temp_outlook/list',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
page | query | integer | false | none |
limit | query | integer | false | none |
type | query | string | false | none |
Example responses
200 Response
{
"data": [
{
"emails": [
"string"
],
"timestamp": 0
}
],
"pagination": {
"page": 0,
"limit": 0,
"total_count": 0,
"total_pages": 0
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | ListTempOutlookResponse |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
GET
/v1/temp_outlook/inbox
( Inbox temporary outlook )
const headers = {
'Accept':'application/json',
'X-Api-Key':'API_KEY'
};
fetch('https://app.sonjj.com/v1/temp_outlook/inbox?email=string×tamp=0',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
query | string | true | none | |
timestamp | query | integer | true | none |
Example responses
200 Response
{
"messages": [
{
"mid": "string",
"textDate": "2019-08-24T14:15:22Z",
"textTo": "string",
"textFrom": "string",
"textSubject": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | InboxResponse |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
GET
/v1/temp_outlook/message
( Message temporary outlook )
const headers = {
'Accept':'application/json',
'X-Api-Key':'API_KEY'
};
fetch('https://app.sonjj.com/v1/temp_outlook/message?email=string&mid=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
query | string | true | none | |
mid | query | string | true | none |
Example responses
200 Response
{
"body": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | MessageResponse |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |