Skip to main content
POST
/
v2
/
jobs
Create Job
curl --request POST \
  --url https://api.tryhamsa.com/v2/jobs \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "TRANSCRIPTION",
  "apiKey": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "mediaUrl": "https://example.com/audio.mp3",
  "title": "Meeting Notes",
  "language": "ar",
  "processingType": "async",
  "webhookUrl": "https://webhook.site/123",
  "webhookAuth": {
    "authKey": "key123",
    "authSecret": "secret456"
  }
}
'
{
  "success": true,
  "message": "Transcription started, you will receive en email when it's ready",
  "messageKey": "OPERATION_SUCCESSFUL",
  "data": {
    "jobId": "ed9b5601-f731-441a-8500-d9fc7610ef8f"
  }
}

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Body

application/json

Request body containing the job payload

type
enum<string>
required
Available options:
TRANSCRIPTION
Example:

"TRANSCRIPTION"

apiKey
string<uuid>
required
Example:

"f47ac10b-58cc-4372-a567-0e02b2c3d479"

mediaUrl
string<uri>
required
Minimum string length: 1
Example:

"https://example.com/audio.mp3"

title
string
required
Minimum string length: 1
Example:

"Meeting Notes"

language
enum<string>
required

Language code for the media being transcribed

Available options:
ar,
en
Example:

"ar"

processingType
enum<string>
default:async
Available options:
async,
sync
Example:

"async"

webhookUrl
string<uri>
Minimum string length: 1
Example:

"https://webhook.site/123"

webhookAuth
object

Response

Successful response with job id

success
boolean
Example:

true

message
string
Example:

"Transcription started, you will receive en email when it's ready"

messageKey
string
Example:

"OPERATION_SUCCESSFUL"

data
object