Postman SDK customization options

View as Markdown

The customizations section of the postman-sdk.config.json file is used to customize your SDKs.

authentication

The authentication options allow you to configure the authentication that your API uses, that’s set using the auth options.

access
object

Custom access token authentication options.

apiKey
object

API key authentication options.

access

The access options allow you to configure the custom access token that’s sent to your API when the auth option has a custom prefix.

prefix
string

The prefix to use for the custom access token authentication. By default, when using custom access token authentication, the Authorization header is passed as Bearer <token>.

By setting the prefix, you can replace “Bearer” with the value of your choice. For example, setting this to "Token" will result in headers like Authorization: Token YOUR_TOKEN.

apiKey

The apiKey option is used to configure the API key authentication for the SDKs. This is used if the auth setting is set to apikey.

header
stringDefaults to X-API-KEY

The header to use for the API key authentication. This is used by the SDKs to set the header when making requests to the API.

For example, if you set this to "MY_CUSTOM_APIKEY_HEADER", the API key will be passed to your API using that header instead of the default X-API-KEY header.

customCode

The customCode section controls change-tracking and merge behavior when regenerating SDKs with preserved custom code. This configuration enables you to maintain custom edits across SDK regenerations.

1{
2 "sdk": {
3 "customCode": {
4 "trackChanges": true,
5 "conflictStrategy": "mark",
6 "noMerge": false
7 }
8 }
9}
trackChanges
booleanDefaults to true

Controls whether the SDK generator tracks changes to generated files between regenerations.

CLI override: --no-track-changes (sets to false)

When true, the generator detects local edits and uploads them for merge processing. When false, the generator performs a clean regeneration that overwrites all files.

conflictStrategy
'mark' | 'ours' | 'theirs'Defaults to mark

Defines how the generator handles merge conflicts when both you and the generator modify the same lines in a file.

CLI override: --conflict-strategy <strategy>

  • "mark" — Adds conflict markers to the file, allowing manual resolution
  • "ours" — Keeps your changes and discards the generator’s changes
  • "theirs" — Keeps the generator’s changes and discards your changes

CLI flags always take priority over configuration file values. For example, running postman sdk generate --conflict-strategy theirs will use the theirs strategy for that specific run, regardless of the config file setting.

noMerge
booleanDefaults to false

Controls whether to skip the merge process entirely, even when edits are detected.

CLI override: --no-merge (sets to true)

When true, forces a clean regeneration of the SDK that overwrites all files, regardless of detected changes.