NocoDB API Response Type Mismatch for OpenAPI

There is an inconsistency between the OpenAPI specification and the actual API response Content-Type for the link records endpoint: https://app.nocodb.com/api/v2/tables/{tableId}/links/{linkFieldId}/records/{recordId}.

The OpenAPI specification clearly defines that 200 OK responses for the GET, POST, and DELETE operations on this path should return Content-Type: application/json. However, the API is currently returning Content-Type: text/html with a plain string body (e.g., “true” for POST/DELETE).

This mismatch causes issues for clients that strictly adhere to the OpenAPI specification for response deserialization. For example, our application, using a Rust OpenAPI client fails to deserialize the text/html response into the expected JSON structure.

Minimal cURL request (needs filled parameters of course):

curl -X POST 'https://app.nocodb.com/api/v2/tables/foo/links/bar/records/1234'   -H 'xc-token: my_token'   -H 'Content-Type: application/json'   --data '{
  "Id": 5678
}'

Have created an issue internally
and we will be resolving this soon. Thank you for letting us know.

Thanks for flagging this!

The behaviour you’re seeing is from our old API (v2). We’ve addressed these response inconsistencies in our new API v3, which provides standardised JSON responses across all endpoints, including links.

We recommend migrating to API v3 to avoid such issues and benefit from improved consistency and features.

You can find the v3 documentation here: NocoDB API Documentation


Note: We will update the necessary changes on API v2 schema soon and rollout.

1 Like