Reset credentials
Reset SMTP credentials of the sandbox.
patch
Authorizations
Api-TokenstringRequired
Pass the API token in the Api-Token
Path parameters
sandbox_idinteger · int64 · min: 1RequiredExample:
Unique sandbox ID
4015Responses
200
Returns attributes of the sandbox.
- permissions returns the permissions of the token for the sandbox.
application/json
idintegerOptional
namestringOptional
usernamestringOptional
passwordstring · nullableOptional
Password is only available if you have admin permissions for the sandbox.
max_sizeintegerOptional
statusstring · enumOptionalPossible values:
email_usernamestringOptional
email_username_enabledbooleanOptional
sent_messages_countintegerOptional
forwarded_messages_countintegerOptional
usedbooleanOptional
forward_from_email_addressstringOptional
project_idintegerOptional
domainstringOptional
pop3_domainstringOptional
email_domainstringOptional
api_domainstringOptional
emails_countintegerOptional
emails_unread_countintegerOptional
last_message_sent_atstring · nullableOptional
smtp_portsinteger[]Optional
pop3_portsinteger[]Optional
max_message_sizeintegerOptional
401
Returns unauthorized error message. Check your credentials.
application/json
403
Returns forbidden error message. Check your permissions.
application/json
404
Returns not found error message
application/json
patch/api/sandboxes/{sandbox_id}/reset_credentials
curl -X PATCH https://mailtrap.io/api/sandboxes/{sandbox_id}/reset_credentials \
-H 'Authorization: Bearer YOUR_API_KEY'
{
"id": 3538,
"name": "Admin Sandbox",
"username": "b3a87978452ae1",
"password": "6be9fcfc613a7c",
"max_size": 0,
"status": "active",
"email_username": "b7eae548c3-54c542",
"email_username_enabled": false,
"sent_messages_count": 52,
"forwarded_messages_count": 0,
"used": false,
"forward_from_email_address": "a3538-i4088@forward.mailtrap.info",
"project_id": 2293,
"domain": "localhost",
"pop3_domain": "localhost",
"email_domain": "localhost",
"api_domain": "localhost",
"emails_count": 0,
"emails_unread_count": 0,
"last_message_sent_at": null,
"smtp_ports": [
25,
465,
587,
2525
],
"pop3_ports": [
1100,
9950
],
"max_message_size": 5242880,
"permissions": {
"can_read": true,
"can_update": true,
"can_destroy": true,
"can_leave": true
}
}Last updated
Was this helpful?

