ID: S202606091026
Status: imported
Tags: avans 2-4 LU1
SwiftSend API Documentation
Overview
SwiftSend is a REST API service for sending SMS and EMAIL messages.
The API provides a simple, reliable interface for sending messages to single or multiple recipients, with builtāin rate limiting and comprehensive error handling.
Base URL:
https://fakecomworld.endpoint/swiftsend
Authentication
SwiftSend uses API key authentication.
Include your API key in the request headers.
Required Headers
| Header | Type | Required | Description |
|---|---|---|---|
| X-API-KEY | string | Yes | Your unique API key for authentication |
| X-STUDENT-GROUP | string | Yes | Your student group identifier |
| Content-Type | string | Yes | Must be application/json |
Endpoints
Send Message
Send an SMS or EMAIL message to one or more recipients.
Endpoint:
POST /swiftsend
Request Body:
{
"type": "SMS",
"recipients": [
"+31612345678",
"+31698765432"
],
"content": "Your message content here"
}Request Schema
| Field | Type | Required | Description |
|---|---|---|---|
| type | enum | Yes | Message type: "SMS" or "EMAIL" |
| recipients | string[] | Yes | Array of recipient addresses (phone numbers or email addresses) |
| content | string | Yes | The message content to send |
Success Response (200 OK)
{
"success": true,
"messageId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"failedRecipients": [],
"error": null
}Partial Success Response (207 Multi-Status)
{
"success": true,
"messageId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"failedRecipients": [
"+31698765432"
],
"error": "Some recipients could not be reached"
}Response Schema
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates if the message was sent successfully |
| messageId | string | Unique identifier for the sent message (UUID format) |
| failedRecipients | string[] | Recipients that failed to receive the message |
| error | string | Error message if applicable, null on success |
Error Responses
- 207 Multi-Status ā Partial Success (check body)
- 401 Unauthorized ā Missing or invalid API key
- 400 Bad Request ā Missing required field
- 400 Bad Request ā Missing
X-STUDENT-GROUP - 429 Too Many Requests ā Rate limit exceeded (check headers)
- 500 Internal Server Error
- 503 Service Unavailable
- 504 Gateway Timeout
Rate Limiting
SwiftSend enforces rate limiting to ensure fair usage.
Defaults:
10 requests per minuteper student group- Rate limit window: 60 seconds (sliding window)
When exceeded, a 429 Too Many Requests response is returned.
Check the response headers for additional rate-limit details.
Response Times
SwiftSend simulates realistic network conditions and outages.
Support
For issues or questions, please contact your instructor or check the project documentation.