Table of contents


 

Part 1 - Usage Guide for Bulk APIs
Step by step details on how to use the Bulk API end point:

  • How to prepare & format their data

  • General guidelines for using Bulk APIs  - Number of records which can be processed as part of Bulk API, using normal APIs for non-bulk use cases

  • Pre-requisites for using Bulk APIs ( Attachments to be stored in Public Url  etc)

  • Specific call outs (FYIs oh what they can expect in terms of behavior of the Bulk APIs) - Notification disabling for Bulk APIs, etc

  • Any other Bulk API specific technical detail which hasn't been captured above


Part 2/3/4 - For each of the Bulk APIs, to cover the following
-- Bulk API endpoint detail
-- Payload request details
-- Payload response details
-- Error handling
-- Rate limits applicable per min for a Bulk API
-- Any other endpoint specific technical detail which hasn't been captured above

----------------------------------------------

Usage Guide for Bulk APIs

Pre-requisites

  1. A Migration Token must be generated and included in the request headers to authenticate calls to the migration APIs.

  2. Attachments must be publicly accessible via a URL for the migration APIs to process them correctly.

  3. Bulk Migration APIs can be used to import Tickets and Notes along with their attachments.

  4. For all other entities, please use the standard public APIs available at: https://api.freshservice.com/

  5. Ensure that dependent entities (e.g., workspaces, users) are created before importing entities that rely on them.

  6. When importing Notes, make sure the corresponding Ticket is created first. The ticket's ID should then be referenced as "ticket_id" in the body of the note request.

Behaviour of the product during the migration

  1. Notifications (Email - only ticket assigned, cc_emails and associations) will not be triggered or sent to end users during the migration.

    • Slack, Teams, Business Rules, Workflows - Will not be muted. Hence the recommendation is to mute them before initiating migration.

  2. Search and Analytics functionality will not update in real time during the migration. There may be a delay in indexing and visibility of migrated data.

  3. A maximum of 50 tickets or notes can be imported in a single request. The account-level rate limit is 10 requests per minute.

  4. The maximum allowed attachment size per entity is 40 MB.

    • For entities with multiple attachments, only those with a cumulative size less than 40 MB will be successfully uploaded. Any additional attachments beyond this limit will fail (partial failure).

    • If a single attachment exceeds 40 MB, the entire attachment will be rejected. However, the parent entity (e.g., ticket or note) will still be created successfully.

  5. Workflows and other configured automations will continue to operate during the migration. Currently, there is no option to disable these automations specifically for migration purposes.

Generating the migration token

Generating the migration token will follow the same steps as below.

https://docs.google.com/document/d/1Ac10DED1iMNTkk-ls2r0lq-wmBdu1eARgIr_0MwF3qE/edit?tab=t.0

Tickets

Endpoint

/api/v2/tickets/bulk

Method

POST

Description

Perform bulk create of entity type "tickets".

Request Schema

Headers

X-API-Key: {api_key}

X-FW-Partner-Migration: {migration_token}

Content-type: application/json


Request body

This request contains a list of ticket entities. Per request currently 50 ticket entities are allowed for bulk processing. 

For the exact payload and fields that are supported refer to the Create ticket payload available in the public api documentation → https://api.freshservice.com/#create_ticket [todo: check if anything else in this payload needs to be called out like attachments]

Note: For attachments alone we need to pass a list of publicly accessible URLs and not the way shown in the documentation mentioned above.

{

  "records": [

    {

      "description": "<div>Details about the issue...</div>",

      "subject": "Support Needed success NEW 19 sep 1...",

      "email": "sample@freshservice.com",

      "priority": 1,

      "status": 4,

      "workspace_id": 2,

      "attachments": [

         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.pdf",

         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.rtf",

         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/app.js",

         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.md"

      ]

    },

    {

      "description": "<div>Details about the issue...</div>",

      "subject": "Support Needed success NEW 19 sep 1...",

      "email": "sample@freshservice.com",

      "priority": 1,

      "status": 4

    },

    {

      "description": "<div>Details about the issue...</div>",

      "subject": "Support Needed success NEW 19 sep 1...",

      "email": "sample@freshservice.com",

      "priority": 1,

      "status": 4

    },

    {

      "description": "<div>Details about the issue...</div>",

      "subject": "Support Needed success NEW 19 sep 1...",

      "email": "sample@freshservice.com",

      "priority": 1,

      "status": 4,

      "workspace_id": 2,

      "attachments": [

         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.pdf",

         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.rtf",

         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/app.js",

         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.md"

      ]

    },

    {

      "description": "<div>Details about the issue...</div>",

      "subject": "Support Needed success NEW 19 sep 1...",

      "email": "sample@freshservice.com",

      "priority": 1,

      "status": 4

    },

    {

      "description": "<div>Details about the issue...</div>",

      "subject": "Support Needed success NEW 19 sep 1...",

      "email": "sample@freshservice.com",

      "priority": 1,

      "status": 4

    },

    {

      "description": "<div>Details about the issue...</div>",

      "subject": "Support Needed success NEW 19 sep 1...",

      "email": "sample@freshservice.com",

      "priority": 1,

      "status": 4

    },

    {

      "description": "<div>Details about the issue...</div>",

      "subject": "Support Needed success NEW 19 sep 1...",

      "email": "sample@freshservice.com",

      "priority": 1,

      "status": 4,

      "workspace_id": 2,

      "attachments": [

         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.pdf",

         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.rtf",

         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/app.js",

         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.md"

      ]

    },

    {

      "description": "<div>Details about the issue...</div>",

      "subject": "Support Needed success NEW 19 sep 1...",

      "email": "sample@freshservice.com",

      "priority": 1,

      "status": 4

    },

    {

      "description": "<div>Details about the issue...</div>",

      "subject": "Support Needed success NEW 19 sep 1...",

      "email": "sample@freshservice.com",

      "priority": 1,

      "status": 4

    },

    {

      "description": "<div>Details about the issue...</div>",

      "subject": "Support Needed success NEW 19 sep 1...",

      "email": "sample@freshservice.com",

      "priority": 1,

      "status": 4

    }

  ]

}


Response Schema

Request queued for processing

API Response code: 202



{

  "job_id": "4de4adda-4bc8-4127-ba84-c9fc112924bf",

  "status": "queued",

  "entity_type": "ticket",

  "total_records": 19,

  "created_at": "2025-09-29T13:51:17Z"

}

 

Notes

Endpoint

/api/v2/notes/bulk

Method

POST

Description

Perform bulk create of entity type "notes".

Request Schema

Headers

X-API-Key: {api_key}

X-FW-Partner-Migration: {migration_token}

Content-type: application/json


Request body

This request contains a list of notes entities. Per request currently 50 notes entities are allowed for bulk processing.

For the exact payload and fields that are supported refer to the Create Note payload available in the public api documentation → https://api.freshservice.com/#create_a_note 

Note: For attachments alone we need to pass a list of publicly accessible URLs and not the way shown in the documentation mentioned above.


{

  "records": [

    {

      "user_id": 46446,

      "ticket_id": 10123123,

      "body": "Priority changed",

      "private": true,

      "incoming": false,

      "attachments": [

        "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.txt",

        "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.zip",

        "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/pexels-eberhardgross-691668.jpg"

      ]

    },

    {

      "user_id": 46446,

      "ticket_id": 8,

      "body": "Pending approval",

      "private": false,

      "incoming": false

    }

  ]

}

Response Schema

Request queued for processing

API Response code: 202

{

  "job_id": "4de4adda-4bc8-4127-ba84-c9fc112924bf",

  "status": "queued",

  "entity_type": "note",

  "total_records": 2,

  "created_at": "2025-09-29T13:51:17Z"

}

Job Status

Endpoint

GET /api/v2/<entity_type>/bulk/{job_id}

Method

GET

Description

Retrieves the current status and detailed results of a bulk import job.

Request Schema

Headers

X-API-Key: {api_key}

Path Parameters

Path Parameters





job_id

UUID

Yes

Unique job identifier

Response Schema

Processing

API Response Code: 202

This response is thrown when the job is still in processing state

{

  "job_id": "123e4567-e89b-12d3-a456-426614174000",

  "status": "processing",

  "entity_type": "tickets",

  "summary": {

    "total_records": 50,

    "processed_records": 25,

    "successful_records": 23,

    "failed_records": 2

  },

  "created_at": "2024-03-21T09:59:00Z",

  "updated_at": "2024-03-21T10:02:30Z",

}

Success

API Response Code: 202

This response is thrown when all the records are successfully processed


{

  "job_id": "123e4567-e89b-12d3-a456-426614174000",

  "status": "success",

  "entity_type": "tickets",

  "summary": {

    "total_records": 2,

    "processed_records": 2,

    "successful_records": 2,

    "failed_records": 0

  },

  "started_at": "2024-03-21T10:00:00Z",

  "completed_at": "2024-03-21T10:05:30Z",

  "created_at": "2024-03-21T09:59:00Z",

  "success_records": [

    {

      "record_index": 0,

      "entity_id": 1

    },

    {

      "record_index": 1,

      "entity_id": 2

    }

  ],

  "failed_records": []

}


Success_with_failures

API Response Code: 202

This response is thrown when there are both success and failure records

{

  "job_id": "123e4567-e89b-12d3-a456-426614174000",

  "status": "success_with_failures",

  "entity_type": "tickets",

  "summary": {

    "total_records": 4,

    "processed_records": 4,

    "successful_records": 2,

    "failed_records": 2

  },

  "started_at": "2024-03-21T10:00:00Z",

  "completed_at": "2024-03-21T10:05:30Z",

  "created_at": "2024-03-21T09:59:00Z",

  "success_records": [

    {

      "record_index": 0,

      "entity_id": 1

    },

    {

      "record_index": 2,

      "entity_id": 2

    }

  ],

  "failed_records": [

    {

      "record_index": 1,

      "error": {

        "code": 1000,

        "message": "no implicit conversion of Symbol into Integer",

        "details": {

          "backtrace": [

            "CodePath"

          ]

        }

      }

    },

    {

      "record_index": 3,

      "error": {

        "code": 2000,

        "details": {

          "errors": {

            "code": "Ticket_Creation_Failed",

            "errors": [

              {

                "code": "missing_field",

                "field": "description",

                "message": "This field cannot be empty"

              },

              {

                "code": "missing_field",

                "field": "subject",

                "message": "It should be of type String"

              }

            ]

          }

        }

      }

    }

  ]

}



Failure

API Response Code: 202

This response is thrown when no records are processed and all have failed.


{

  "job_id": "123e4567-e89b-12d3-a456-426614174000",

  "status": "failure",

  "entity_type": "tickets",

  "summary": {

    "total_records": 2,

    "processed_records": 2,

    "successful_records": 0,

    "failed_records": 2

  },

  "started_at": "2024-03-21T10:00:00Z",

  "completed_at": "2024-03-21T10:05:30Z",

  "created_at": "2024-03-21T09:59:00Z",

  "success_records": [  ],

  "failed_records": [

    {

      "record_index": 0,

      "error": {

        "code": 1000,

        "message": "no implicit conversion of Symbol into Integer",

        "details": {

          "backtrace": [

            "CodePath"

          ]

        }

      }

    },

    {

      "record_index": 1,

      "error": {

        "code": 2000,

        "details": {

          "errors": {

            "code": "Ticket_Creation_Failed",

            "errors": [

              {

                "code": "missing_field",

                "field": "description",

                "message": "This field cannot be empty"

              },

              {

                "code": "missing_field",

                "field": "subject",

                "message": "It should be of type String"

              }

            ]

          }

        }

      }

    }

  ]

}


Error Response - Job not found

API Response Code: 404

This response is thrown when the corresponding job-id is not found/does not exist in our backend database. This generally happens when no job with this job-id is created.

{

  "error": {

    "code": "JOB_NOT_FOUND",

    "message": "Job with ID '123e4567-e89b-12d3-a456-426614174000' not found"

  }

}




Error Codes and Handling

Below are the errors that we can see when the response code is 200 and the job has been submitted, but there was some issue in processing the records.

Type of Error

ErrorCode

Description

Sample Payload

How to 

Ticket_Creation_Failed

2001


- Used when core/primary entities fail to be created

 - Examples: Ticket_Creation_Failed, Problem_Creation_Failed, Note_Creation_Failed

 - These are the main objects being imported - if they fail, dependent objects (like attachments) can't be created

  {

      "record_index": 1,

      "error": {

        "code": 2001,

        "details": {

          "errors": {

            "code": "Ticket_Creation_Failed",

            "errors": [

              {

                "code": "missing_field",

                "field": "description",

                "message": "This field cannot be empty"

              },

              {

                "code": "missing_field",

                "field": "subject",

                "message": "It should be of type String"

              }

            ]

          }

        }

      }

Solve for the message for the respective field and try creating the entity again.

Note_Creation_Failed

2001

Attachment_Creation_Failed

2002

 - Used when secondary/dependent entities fail to be created

 - Example: Attachment_Creation_Failed

 - These failures don't prevent the main entity from being created but represent partial success

Attachment Issue:

  {
"record_index": 0,
"error": {
"code": 2002,
"details": {
"errors": {
"code": "Attachment_Creation_Failed",
"errors": [
{
"message": "403 Forbidden",
                                "identifier": "
https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipeeeee.zip"
},
{
"message": "403 Forbidden",
                                "identifier": "
https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/apppppp.js"
}
]
}
}
}
        }

Attachment File Size Exceeded:

{
"record_index": 1,
"error": {
"code": 2002,
"details": {
"errors": {
"code": "Attachment_Creation_Failed",
"errors": [
{
"message": "Attachment limit exceeded. We allow only 40 MB.",
                                "identifier": "
https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.rtf"
}
]
}
}
}
        }

Attachment Issue

This issue comes up if the URL is incorrect or if the attachment URL is giving a different status other than success. The message would reflect the details more accurately.

Attachment File Size exceeded:

This happens if the attachment size of an entity crossed 40 MB. In this case, the ticket is created successfully and the attachments previous to the one mentioned are all attached (in case of multiple attachments). All the ones that cross the 40 MB threshold are all failed.

Generic Exception

1000

- Used for unexpected exceptions 

 - These are typically programming errors

 - Indicates something went wrong at the code level rather than business logic


Raise a ticket with freshworks support as this might require a code fix.

Generic Response Exception Code

2000

 - Default fallback for business logic errors that don't fit specific categories

 - Used when the entity creation process returns any validation/creation errors



The system examines the error response and:
1. Checks for parent entity errors first - if any core entity creation failed, assigns code 2001
2. Then checks for child entity errors - if only secondary entities failed, assigns code 2002
 3. Falls back to generic response error (2000) if the error pattern doesn't match known types

All the above errors cannot be retried automatically. In the event of occurrence either it needs to be handled via code change(bug) or customer should change the payload to pass the validation.

Retrying failed entities

To retry failed entities, please resolve the errors specified in the response, then create and submit a new bulk API request. If the issue requires a code fix, kindly raise a support ticket with Freshservice Support or Engineering.

Rate Limits

Account level rate limits are listed below for each endpoint. [To be confirmed post load testing]



/api/v2/tickets/bulk

10

/api/v2/notes/bulk

10

/api/v2/<entity>/<job_id>

75