Last updated: 2025-11-24

Source: https://support.freshservice.com/support/solutions/articles/50000011768-how-to-migrate-into-freshservice-via-bulk-apis-for-freshservice-data-migration-partners-

How to migrate into Freshservice via Bulk APIs? \[For Freshservice Data Migration Partners\]

``` Table of contentsUsage Guide for Bulk APIs Pre-requisites Behaviour of the product during the migration

Generating the migration token TicketsEndpoint Method Description Request Schema Headers Request body

Response Schema Request queued for processing

NotesEndpoint Method Description Request SchemaHeaders Request body

Response Schema Request queued for processing

Job StatusEndpoint Method Description Request SchemaHeaders Path Parameters Path Parameters

Response Schema Processing Success Success_with_failures Failure Error Response - Job not found

Error Codes and HandlingRetrying failed entities

Rate Limits ```

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.

    {<br>"records": \[<br>    {<br>      "description": "<div>Details about the issue...</div>",<br>      "subject": "Support Needed success NEW 19 sep 1...",<br>      "email": "sample@freshservice.com",<br>      "priority": 1,<br>      "status": 4,<br>      "workspace\_id": 2,<br>      "attachments": \[<br>         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.pdf",<br>         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.rtf",<br>         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/app.js",<br>         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.md"<br>      \]<br>    },<br>    {<br>      "description": "<div>Details about the issue...</div>",<br>      "subject": "Support Needed success NEW 19 sep 1...",<br>      "email": "sample@freshservice.com",<br>      "priority": 1,<br>      "status": 4<br>    },<br>    {<br>      "description": "<div>Details about the issue...</div>",<br>      "subject": "Support Needed success NEW 19 sep 1...",<br>      "email": "sample@freshservice.com",<br>      "priority": 1,<br>      "status": 4<br>    },<br>    {<br>      "description": "<div>Details about the issue...</div>",<br>      "subject": "Support Needed success NEW 19 sep 1...",<br>      "email": "sample@freshservice.com",<br>      "priority": 1,<br>      "status": 4,<br>      "workspace\_id": 2,<br>      "attachments": \[<br>         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.pdf",<br>         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.rtf",<br>         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/app.js",<br>         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.md"<br>      \]<br>    },<br>    {<br>      "description": "<div>Details about the issue...</div>",<br>      "subject": "Support Needed success NEW 19 sep 1...",<br>      "email": "sample@freshservice.com",<br>      "priority": 1,<br>      "status": 4<br>    },<br>    {<br>      "description": "<div>Details about the issue...</div>",<br>      "subject": "Support Needed success NEW 19 sep 1...",<br>      "email": "sample@freshservice.com",<br>      "priority": 1,<br>      "status": 4<br>    },<br>    {<br>      "description": "<div>Details about the issue...</div>",<br>      "subject": "Support Needed success NEW 19 sep 1...",<br>      "email": "sample@freshservice.com",<br>      "priority": 1,<br>      "status": 4<br>    },<br>    {<br>      "description": "<div>Details about the issue...</div>",<br>      "subject": "Support Needed success NEW 19 sep 1...",<br>      "email": "sample@freshservice.com",<br>      "priority": 1,<br>      "status": 4,<br>      "workspace\_id": 2,<br>      "attachments": \[<br>         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.pdf",<br>         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.rtf",<br>         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/app.js",<br>         "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.md"<br>      \]<br>    },<br>    {<br>      "description": "<div>Details about the issue...</div>",<br>      "subject": "Support Needed success NEW 19 sep 1...",<br>      "email": "sample@freshservice.com",<br>      "priority": 1,<br>      "status": 4<br>    },<br>    {<br>      "description": "<div>Details about the issue...</div>",<br>      "subject": "Support Needed success NEW 19 sep 1...",<br>      "email": "sample@freshservice.com",<br>      "priority": 1,<br>      "status": 4<br>    },<br>    {<br>      "description": "<div>Details about the issue...</div>",<br>      "subject": "Support Needed success NEW 19 sep 1...",<br>      "email": "sample@freshservice.com",<br>      "priority": 1,<br>      "status": 4<br>    }<br>\]<br>}

    Response Schema

    Request queued for processing

    API Response code: 202

    {<br>"job\_id": "4de4adda-4bc8-4127-ba84-c9fc112924bf",<br>"status": "queued",<br>"entity\_type": "ticket",<br>"total\_records": 19,<br>"created\_at": "2025-09-29T13:51:17Z"<br>}

    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.

    {<br>"records": \[<br>    {<br>      "user\_id": 46446,<br>      "ticket\_id": 10123123,<br>      "body": "Priority changed",<br>      "private": true,<br>      "incoming": false,<br>      "attachments": \[<br>        "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.txt",<br>        "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.zip",<br>        "https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/pexels-eberhardgross-691668.jpg"<br>      \]<br>    },<br>    {<br>      "user\_id": 46446,<br>      "ticket\_id": 8,<br>      "body": "Pending approval",<br>      "private": false,<br>      "incoming": false<br>    }<br>\]<br>}

    Response Schema

    Request queued for processing

    API Response code: 202

    {<br>"job\_id": "4de4adda-4bc8-4127-ba84-c9fc112924bf",<br>"status": "queued",<br>"entity\_type": "note",<br>"total\_records": 2,<br>"created\_at": "2025-09-29T13:51:17Z"<br>}

    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\_idUUIDYesUnique job identifier

    Response Schema

    Processing

    API Response Code: 202

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

    {<br>"job\_id": "123e4567-e89b-12d3-a456-426614174000",<br>"status": "processing",<br>"entity\_type": "tickets",<br>"summary": {<br>    "total\_records": 50,<br>    "processed\_records": 25,<br>    "successful\_records": 23,<br>    "failed\_records": 2<br>},<br>"created\_at": "2024-03-21T09:59:00Z",<br>"updated\_at": "2024-03-21T10:02:30Z",<br>}

    Success

    API Response Code: 202

    This response is thrown when all the records are successfully processed

    {<br>"job\_id": "123e4567-e89b-12d3-a456-426614174000",<br>"status": "success",<br>"entity\_type": "tickets",<br>"summary": {<br>    "total\_records": 2,<br>    "processed\_records": 2,<br>    "successful\_records": 2,<br>    "failed\_records": 0<br>},<br>"started\_at": "2024-03-21T10:00:00Z",<br>"completed\_at": "2024-03-21T10:05:30Z",<br>"created\_at": "2024-03-21T09:59:00Z",<br>"success\_records": \[<br>    {<br>      "record\_index": 0,<br>      "entity\_id": 1<br>    },<br>    {<br>      "record\_index": 1,<br>      "entity\_id": 2<br>    }<br>\],<br>"failed\_records": \[\]<br>}

    Success\_with\_failures

    API Response Code: 202

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

    {<br>"job\_id": "123e4567-e89b-12d3-a456-426614174000",<br>"status": "success\_with\_failures",<br>"entity\_type": "tickets",<br>"summary": {<br>    "total\_records": 4,<br>    "processed\_records": 4,<br>    "successful\_records": 2,<br>    "failed\_records": 2<br>},<br>"started\_at": "2024-03-21T10:00:00Z",<br>"completed\_at": "2024-03-21T10:05:30Z",<br>"created\_at": "2024-03-21T09:59:00Z",<br>"success\_records": \[<br>    {<br>      "record\_index": 0,<br>      "entity\_id": 1<br>    },<br>    {<br>      "record\_index": 2,<br>      "entity\_id": 2<br>    }<br>\],<br>"failed\_records": \[<br>    {<br>      "record\_index": 1,<br>      "error": {<br>        "code": 1000,<br>        "message": "no implicit conversion of Symbol into Integer",<br>        "details": {<br>          "backtrace": \[<br>            "CodePath"<br>          \]<br>        }<br>      }<br>    },<br>    {<br>      "record\_index": 3,<br>      "error": {<br>        "code": 2000,<br>        "details": {<br>          "errors": {<br>            "code": "Ticket\_Creation\_Failed",<br>            "errors": \[<br>              {<br>                "code": "missing\_field",<br>                "field": "description",<br>                "message": "This field cannot be empty"<br>              },<br>              {<br>                "code": "missing\_field",<br>                "field": "subject",<br>                "message": "It should be of type String"<br>              }<br>            \]<br>          }<br>        }<br>      }<br>    }<br>\]<br>}

    Failure

    API Response Code: 202

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

    {<br>"job\_id": "123e4567-e89b-12d3-a456-426614174000",<br>"status": "failure",<br>"entity\_type": "tickets",<br>"summary": {<br>    "total\_records": 2,<br>    "processed\_records": 2,<br>    "successful\_records": 0,<br>    "failed\_records": 2<br>},<br>"started\_at": "2024-03-21T10:00:00Z",<br>"completed\_at": "2024-03-21T10:05:30Z",<br>"created\_at": "2024-03-21T09:59:00Z",<br>"success\_records": \[  \],<br>"failed\_records": \[<br>    {<br>      "record\_index": 0,<br>      "error": {<br>        "code": 1000,<br>        "message": "no implicit conversion of Symbol into Integer",<br>        "details": {<br>          "backtrace": \[<br>            "CodePath"<br>          \]<br>        }<br>      }<br>    },<br>    {<br>      "record\_index": 1,<br>      "error": {<br>        "code": 2000,<br>        "details": {<br>          "errors": {<br>            "code": "Ticket\_Creation\_Failed",<br>            "errors": \[<br>              {<br>                "code": "missing\_field",<br>                "field": "description",<br>                "message": "This field cannot be empty"<br>              },<br>              {<br>                "code": "missing\_field",<br>                "field": "subject",<br>                "message": "It should be of type String"<br>              }<br>            \]<br>          }<br>        }<br>      }<br>    }<br>\]<br>}

    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.

    {<br>"error": {<br>    "code": "JOB\_NOT\_FOUND",<br>    "message": "Job with ID '123e4567-e89b-12d3-a456-426614174000' not found"<br>}<br>}

    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 ErrorErrorCodeDescriptionSample PayloadHow to
    Ticket\_Creation\_Failed2001\- Used when core/primary entities fail to be created<br>\- Examples: Ticket\_Creation\_Failed, Problem\_Creation\_Failed, Note\_Creation\_Failed<br>\- These are the main objects being imported - if they fail, dependent objects (like attachments) can't be created{<br>      "record\_index": 1,<br>      "error": {<br>        "code": 2001,<br>        "details": {<br>          "errors": {<br>            "code": "Ticket\_Creation\_Failed",<br>            "errors": \[<br>              {<br>                "code": "missing\_field",<br>                "field": "description",<br>                "message": "This field cannot be empty"<br>              },<br>              {<br>                "code": "missing\_field",<br>                "field": "subject",<br>                "message": "It should be of type String"<br>              }<br>            \]<br>          }<br>        }<br>      }Solve for the message for the respective field and try creating the entity again.
    Note\_Creation\_Failed2001
    Attachment\_Creation\_Failed2002\- Used when secondary/dependent entities fail to be created<br>\- Example: Attachment\_Creation\_Failed<br>\- These failures don't prevent the main entity from being created but represent partial successAttachment Issue:<br>{<br>"record\_index": 0,<br>"error": {<br>"code": 2002,<br>"details": {<br>"errors": {<br>"code": "Attachment\_Creation\_Failed",<br>"errors": \<br>{<br>"message": "403 Forbidden",<br>                                "identifier": " [https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipeeeee.zip"<br>},<br>{<br>"message": "403 Forbidden",<br>                                "identifier": " https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/apppppp.js"<br>}<br>\]<br>}<br>}<br>}<br>        }<br>Attachment File Size Exceeded:<br>{<br>"record\_index": 1,<br>"error": {<br>"code": 2002,<br>"details": {<br>"errors": {<br>"code": "Attachment\_Creation\_Failed",<br>"errors": \<br>{<br>"message": "Attachment limit exceeded. We allow only 40 MB.",<br>                                "identifier": " [https://fs-bot-staging.s3.us-east-1.amazonaws.com/Bulk+API+test+files/Recipe.rtf"<br>}<br>\]<br>}<br>}<br>}<br>        }Attachment Issue<br>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.<br>Attachment File Size exceeded:<br>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 Exception1000\- Used for unexpected exceptions <br>\- These are typically programming errors<br>\- Indicates something went wrong at the code level rather than business logicRaise a ticket with freshworks support as this might require a code fix.
    Generic Response Exception Code2000\- Default fallback for business logic errors that don't fit specific categories<br>\- 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/bulk10
    /api/v2/notes/bulk10
    /api/v2/<entity>/<job\_id>75