Base path:
/sender-idsTypes
Type Definitions
Type Definitions
// ============ Request Types ============
interface CreateSenderIdRequest {
senderId: string; // Alphanumeric, 1-11 characters
country: string; // ISO 3166-1 alpha-2
description?: string; // max 500 characters
status?: 'active' | 'inactive' | 'reserved'; // default: 'active'
}
interface UpdateSenderIdRequest {
senderId?: string; // Alphanumeric, 1-11 characters
country?: string; // ISO 3166-1 alpha-2
description?: string; // max 500 characters
status?: 'active' | 'inactive' | 'reserved';
}
interface AssignSenderIdRequest {
organizationId: string; // UUID of target organization
}
// ============ Query Parameters ============
interface SenderIdQueryParams {
page?: number; // default: 1, min: 1
limit?: number; // default: 20, max: 100
search?: string; // searches senderId, description
sortBy?: string; // senderId, country, status, createdAt
sortOrder?: 'asc' | 'desc'; // default: 'desc'
status?: 'active' | 'inactive' | 'reserved';
isShared?: boolean; // filter shared vs private
organizationId?: string; // filter by assigned organization UUID
}
// ============ Response Types ============
interface SenderIdResponse {
id: string;
senderId: string;
country: string;
description: string | null;
isShared: boolean;
organizationId: string | null;
status: 'active' | 'inactive' | 'reserved';
createdAt: string; // ISO date
updatedAt: string; // ISO date
deletedAt: string | null; // ISO date (soft delete)
createdBy: string | null; // User UUID
updatedBy: string | null; // User UUID
deletedBy: string | null; // User UUID
}
interface SenderIdListResponse {
data: SenderIdResponse[];
meta: PaginationMeta;
}
interface PaginationMeta {
page: number;
limit: number;
total: number;
totalPages: number;
hasNextPage: boolean;
hasPreviousPage: boolean;
}
// ============ Available (Org-Level) ============
interface SenderIdAvailableQueryParams {
page?: number; // default: 1
limit?: number; // default: 20, max: 100
search?: string; // searches senderId
sortOrder?: 'asc' | 'desc'; // default: 'desc'
}
interface SenderIdAvailableResponse {
id: string;
senderId: string;
country: string;
status: 'active' | 'inactive' | 'reserved';
isShared: boolean;
}
interface SenderIdAvailableListResponse {
data: SenderIdAvailableResponse[];
meta: PaginationMeta;
}
List active Sender IDs available to the current organization
curl -X GET https://api.gomobile.ma/api/sender-ids/available?search=GoMobile&page=1&limit=10 \
-H "x-api-key: YOUR_API_KEY"
{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"senderId": "GoMobile",
"country": "MA",
"status": "active",
"isShared": true
}
],
"meta": {
"page": 1,
"limit": 10,
"total": 1,
"totalPages": 1,
"hasNextPage": false,
"hasPreviousPage": false
}
}