> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Add discovered services to the API Catalog

POST https://api.getpostman.com/api-catalog/discovery-services
Content-Type: application/json

Adds discovered services to the API Catalog. Accepts up to 20 services in a single call.

Reference: https://learning.postman.com/api-docs/api-reference/api-catalog/post-api-catalog-discovery-services

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /api-catalog/discovery-services:
    post:
      operationId: postApiCatalogDiscoveryServices
      summary: Add discovered services to the API Catalog
      description: >-
        Adds discovered services to the API Catalog. Accepts up to 20 services
        in a single call.
      tags:
        - apiCatalog
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/postApiCatalogDiscoveryServicesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiCatalogError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostApiCatalogDiscoveryServicesRequestInternalServerError
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postApiCatalogDiscoveryServices'
servers:
  - url: https://api.getpostman.com
    description: https://api.getpostman.com
  - url: https://api.eu.postman.com
    description: https://api.eu.postman.com
components:
  schemas:
    postApiCatalogDiscoveryServicesApiDefinitionData:
      type: object
      properties:
        content:
          type: string
          description: >-
            A Base64-encoded JSON API definition. Cannot exceed 2 MB after
            decoding.
      description: >-
        The API definition (specification) for the service. If you pass this
        with the `endpoints` array, this object is given preference and
        `endpoints` is ignored.
      title: postApiCatalogDiscoveryServicesApiDefinitionData
    apiCatalogDiscoveryServiceEndpointsData:
      type: object
      properties:
        method:
          type: string
          description: The endpoint's HTTP method.
        path:
          type: string
          description: The endpoint's URL path.
        description:
          type:
            - string
            - 'null'
          description: The endpoint's description.
        host:
          type: string
          description: The endpoint's host.
      description: Information about a service's endpoint.
      title: apiCatalogDiscoveryServiceEndpointsData
    apiCatalogDiscoveryServicesTagsData:
      type: array
      items:
        type: string
      description: A list of tags associated with the service.
      title: apiCatalogDiscoveryServicesTagsData
    postApiCatalogDiscoveryServicesProviderMetadataData:
      type: object
      properties:
        commitSha:
          type: string
          description: A commit hash ID.
        branch:
          type: string
          description: The source provider's branch name.
        gitRepoUrl:
          type: string
          description: The source provider's Git repo URL.
        deployedAt:
          type: string
          format: date-time
          description: The date and time at which the service was deployed.
      description: Additional metadata from the discovery source provider.
      title: postApiCatalogDiscoveryServicesProviderMetadataData
    postApiCatalogDiscoveryServiceData:
      type: object
      properties:
        name:
          type: string
          description: The service's name.
        version:
          type: string
          description: The service's version.
        providerServiceId:
          type: string
          description: >-
            The ID of the service in the source registry. If you do not pass
            this property, the system uses the `{name}:{version}` value.
        description:
          type: string
          description: The service's description.
        sourceEnvironment:
          type: string
          description: The service's source environment.
        apiDefinition:
          $ref: >-
            #/components/schemas/postApiCatalogDiscoveryServicesApiDefinitionData
        endpoints:
          type: array
          items:
            $ref: '#/components/schemas/apiCatalogDiscoveryServiceEndpointsData'
          description: >-
            A list of the service's endpoints. If you pass this with the
            `apiDefinition` array, this array is ignored.
        tags:
          $ref: '#/components/schemas/apiCatalogDiscoveryServicesTagsData'
        providerMetadata:
          $ref: >-
            #/components/schemas/postApiCatalogDiscoveryServicesProviderMetadataData
      required:
        - name
      description: Information about the discovered service.
      title: postApiCatalogDiscoveryServiceData
    postApiCatalogDiscoveryServices:
      type: object
      properties:
        discoveredServices:
          type: array
          items:
            $ref: '#/components/schemas/postApiCatalogDiscoveryServiceData'
          description: A list of discovered services to add to the API Catalog.
      required:
        - discoveredServices
      title: postApiCatalogDiscoveryServices
    postApiCatalogDiscoveryServicesServiceData:
      type: object
      properties:
        id:
          type: string
          description: The service's ID.
        organizationId:
          type: integer
          description: The ID of the organization that the service belongs to.
        name:
          type: string
          description: The servie's name.
        description:
          type:
            - string
            - 'null'
          description: The service's description.
        version:
          type:
            - string
            - 'null'
          description: The service's version.
        sourceEnvironment:
          type:
            - string
            - 'null'
          description: The source environment in which the service was discovered.
        systemEnvironmentId:
          type:
            - string
            - 'null'
          description: >-
            The mapped system environment's ID. Returns a null value if the
            environment is not mapped.
        tags:
          $ref: '#/components/schemas/apiCatalogDiscoveryServicesTagsData'
        status:
          type: string
          description: The service's current status.
        endpointsCount:
          type: integer
          description: The total number of endpoints associated with the service.
        providerServiceId:
          type: string
          description: The ID of the service in the source registry.
        discoveredAt:
          type: string
          format: date-time
          description: The date and time at which the service was first discovered.
        discoveredBy:
          type: integer
          description: The user ID of the user who discovered or ingested the service.
        lastSyncedAt:
          type: string
          format: date-time
          description: The date and time of the most recent service sync.
      description: Information about a discovered service.
      title: postApiCatalogDiscoveryServicesServiceData
    postApiCatalogDiscoveryServicesResponseMetaData:
      type: object
      properties:
        total:
          type: integer
          description: The total number of services processed.
        created:
          type: integer
          description: The number of new services created.
        updated:
          type: integer
          description: The number of existing services updated.
      description: The operation's metadata summary.
      title: postApiCatalogDiscoveryServicesResponseMetaData
    postApiCatalogDiscoveryServicesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/postApiCatalogDiscoveryServicesServiceData'
          description: A list of discovered services.
        meta:
          $ref: '#/components/schemas/postApiCatalogDiscoveryServicesResponseMetaData'
      title: postApiCatalogDiscoveryServicesResponse
    apiCatalogErrorPathMessage:
      type: object
      properties:
        path:
          type: string
          description: The path in which the error occurred.
        message:
          type: string
          description: The error message.
      description: Information about the error.
      title: apiCatalogErrorPathMessage
    apiCatalogError:
      type: object
      properties:
        type:
          type: string
          format: uri
          description: >-
            The [URI reference](https://www.rfc-editor.org/rfc/rfc3986) that
            identifies the type of problem.
        status:
          type: integer
          description: The HTTP status code generated by the origin server.
        title:
          type: string
          description: A short summary of the problem.
        detail:
          type: string
          description: An explanation about the problem.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/apiCatalogErrorPathMessage'
          description: A list of errors.
      title: apiCatalogError
    CommonErrorTypeTitleDetailStatusType:
      oneOf:
        - type: string
          format: uri-reference
        - type: string
      title: CommonErrorTypeTitleDetailStatusType
    commonErrorTypeTitleDetailStatus:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailStatusType'
        title:
          type: string
          description: A short summary of the problem.
        detail:
          type: string
          description: Information about the error.
        status:
          type: integer
          description: The error's HTTP status code.
      title: commonErrorTypeTitleDetailStatus
    CommonErrorTypeTitleDetailDetail:
      oneOf:
        - type: string
        - type: object
          additionalProperties:
            description: Any type
      description: Information about the error.
      title: CommonErrorTypeTitleDetailDetail
    commonErrorTypeTitleDetail:
      type: object
      properties:
        type:
          type: string
          description: The type of error.
        title:
          type: string
          description: A short summary of the problem.
        detail:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailDetail'
          description: Information about the error.
      title: commonErrorTypeTitleDetail
    CommonErrorNameMessageError:
      type: object
      properties:
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
      description: Information about the error.
      title: CommonErrorNameMessageError
    commonErrorNameMessage:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/CommonErrorNameMessageError'
          description: Information about the error.
      title: commonErrorNameMessage
    PostApiCatalogDiscoveryServicesRequestInternalServerError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetail'
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: PostApiCatalogDiscoveryServicesRequestInternalServerError
  securitySchemes:
    PostmanApiKey:
      type: apiKey
      in: header
      name: x-api-key
    scimApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        A valid [SCIM API
        key](https://learning.postman.com/docs/administration/scim-provisioning/scim-provisioning-overview/#generating-scim-api-key)
        for calls to SCIM endpoints.
    basicAuth:
      type: http
      scheme: basic

```

## Examples

### Successful Response



**Request**

```json
undefined
```

**Response**

```json
{
  "data": [
    {
      "id": "9feb4e3c-0cd8-44db-b137-7bf09aee73cd",
      "organizationId": 123,
      "name": "user-service",
      "description": "Handles user registration, authentication, and profile management.",
      "version": "3.0.0",
      "sourceEnvironment": "production",
      "systemEnvironmentId": null,
      "tags": [
        "auth",
        "core",
        "identity"
      ],
      "status": "discovered",
      "endpointsCount": 5,
      "providerServiceId": "usr-svc-custom-id-001",
      "discoveredAt": "2026-02-25 03:22:54",
      "discoveredBy": 12345678,
      "lastSyncedAt": "2026-02-25 03:22:54"
    }
  ],
  "meta": {
    "total": 1,
    "created": 1,
    "updated": 0
  }
}
```

**SDK Code**

```python Successful Response
import requests

url = "https://api.getpostman.com/api-catalog/discovery-services"

headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Successful Response
const url = 'https://api.getpostman.com/api-catalog/discovery-services';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: undefined
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Successful Response
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/api-catalog/discovery-services"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Successful Response
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/api-catalog/discovery-services")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
```

```java Successful Response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/api-catalog/discovery-services")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

```php Successful Response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/api-catalog/discovery-services', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Successful Response
using RestSharp;

var client = new RestClient("https://api.getpostman.com/api-catalog/discovery-services");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Successful Response
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/api-catalog/discovery-services")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Add a Discovered Service



**Request**

```json
{
  "discoveredServices": [
    {
      "name": "payment-service"
    }
  ]
}
```

**Response**

```json
{
  "data": [
    {
      "id": "9feb4e3c-0cd8-44db-b137-7bf09aee73cd",
      "organizationId": 123,
      "name": "user-service",
      "description": "Handles user registration, authentication, and profile management.",
      "version": "3.0.0",
      "sourceEnvironment": "production",
      "systemEnvironmentId": null,
      "tags": [
        "auth",
        "core",
        "identity"
      ],
      "status": "discovered",
      "endpointsCount": 5,
      "providerServiceId": "usr-svc-custom-id-001",
      "discoveredAt": "2026-02-25 03:22:54",
      "discoveredBy": 12345678,
      "lastSyncedAt": "2026-02-25 03:22:54"
    }
  ],
  "meta": {
    "total": 1,
    "created": 1,
    "updated": 0
  }
}
```

**SDK Code**

```python Add a Discovered Service
import requests

url = "https://api.getpostman.com/api-catalog/discovery-services"

payload = { "discoveredServices": [{ "name": "payment-service" }] }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Add a Discovered Service
const url = 'https://api.getpostman.com/api-catalog/discovery-services';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"discoveredServices":[{"name":"payment-service"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Add a Discovered Service
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/api-catalog/discovery-services"

	payload := strings.NewReader("{\n  \"discoveredServices\": [\n    {\n      \"name\": \"payment-service\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Add a Discovered Service
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/api-catalog/discovery-services")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"discoveredServices\": [\n    {\n      \"name\": \"payment-service\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Add a Discovered Service
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/api-catalog/discovery-services")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"discoveredServices\": [\n    {\n      \"name\": \"payment-service\"\n    }\n  ]\n}")
  .asString();
```

```php Add a Discovered Service
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/api-catalog/discovery-services', [
  'body' => '{
  "discoveredServices": [
    {
      "name": "payment-service"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Add a Discovered Service
using RestSharp;

var client = new RestClient("https://api.getpostman.com/api-catalog/discovery-services");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"discoveredServices\": [\n    {\n      \"name\": \"payment-service\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Add a Discovered Service
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["discoveredServices": [["name": "payment-service"]]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/api-catalog/discovery-services")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Add a Fully-Populated Service



**Request**

```json
{
  "discoveredServices": [
    {
      "name": "user-service",
      "version": "3.0.0",
      "providerServiceId": "usr-svc-custom-id-001",
      "description": "Handles user registration, authentication, and profile management",
      "sourceEnvironment": "production",
      "endpoints": [
        {
          "method": "GET",
          "path": "/users",
          "description": "List all users"
        },
        {
          "method": "POST",
          "path": "/users",
          "description": "Create a new user"
        },
        {
          "method": "GET",
          "path": "/users/{id}",
          "description": "Get user by ID"
        },
        {
          "method": "PUT",
          "path": "/users/{id}",
          "description": "Update user"
        },
        {
          "method": "DELETE",
          "path": "/users/{id}",
          "description": "Delete user"
        }
      ],
      "tags": [
        "auth",
        "core",
        "identity"
      ],
      "providerMetadata": {
        "commitSha": "a1b2c3d4e5f6",
        "branch": "main",
        "gitRepoUrl": "https://github.com/acme/user-service",
        "deployedAt": "2026-02-10T12:00:00Z"
      }
    }
  ]
}
```

**Response**

```json
{
  "data": [
    {
      "id": "9feb4e3c-0cd8-44db-b137-7bf09aee73cd",
      "organizationId": 123,
      "name": "user-service",
      "description": "Handles user registration, authentication, and profile management.",
      "version": "3.0.0",
      "sourceEnvironment": "production",
      "systemEnvironmentId": null,
      "tags": [
        "auth",
        "core",
        "identity"
      ],
      "status": "discovered",
      "endpointsCount": 5,
      "providerServiceId": "usr-svc-custom-id-001",
      "discoveredAt": "2026-02-25 03:22:54",
      "discoveredBy": 12345678,
      "lastSyncedAt": "2026-02-25 03:22:54"
    }
  ],
  "meta": {
    "total": 1,
    "created": 1,
    "updated": 0
  }
}
```

**SDK Code**

```python Add a Fully-Populated Service
import requests

url = "https://api.getpostman.com/api-catalog/discovery-services"

payload = { "discoveredServices": [
        {
            "name": "user-service",
            "version": "3.0.0",
            "providerServiceId": "usr-svc-custom-id-001",
            "description": "Handles user registration, authentication, and profile management",
            "sourceEnvironment": "production",
            "endpoints": [
                {
                    "method": "GET",
                    "path": "/users",
                    "description": "List all users"
                },
                {
                    "method": "POST",
                    "path": "/users",
                    "description": "Create a new user"
                },
                {
                    "method": "GET",
                    "path": "/users/{id}",
                    "description": "Get user by ID"
                },
                {
                    "method": "PUT",
                    "path": "/users/{id}",
                    "description": "Update user"
                },
                {
                    "method": "DELETE",
                    "path": "/users/{id}",
                    "description": "Delete user"
                }
            ],
            "tags": ["auth", "core", "identity"],
            "providerMetadata": {
                "commitSha": "a1b2c3d4e5f6",
                "branch": "main",
                "gitRepoUrl": "https://github.com/acme/user-service",
                "deployedAt": "2026-02-10T12:00:00Z"
            }
        }
    ] }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Add a Fully-Populated Service
const url = 'https://api.getpostman.com/api-catalog/discovery-services';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"discoveredServices":[{"name":"user-service","version":"3.0.0","providerServiceId":"usr-svc-custom-id-001","description":"Handles user registration, authentication, and profile management","sourceEnvironment":"production","endpoints":[{"method":"GET","path":"/users","description":"List all users"},{"method":"POST","path":"/users","description":"Create a new user"},{"method":"GET","path":"/users/{id}","description":"Get user by ID"},{"method":"PUT","path":"/users/{id}","description":"Update user"},{"method":"DELETE","path":"/users/{id}","description":"Delete user"}],"tags":["auth","core","identity"],"providerMetadata":{"commitSha":"a1b2c3d4e5f6","branch":"main","gitRepoUrl":"https://github.com/acme/user-service","deployedAt":"2026-02-10T12:00:00Z"}}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Add a Fully-Populated Service
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/api-catalog/discovery-services"

	payload := strings.NewReader("{\n  \"discoveredServices\": [\n    {\n      \"name\": \"user-service\",\n      \"version\": \"3.0.0\",\n      \"providerServiceId\": \"usr-svc-custom-id-001\",\n      \"description\": \"Handles user registration, authentication, and profile management\",\n      \"sourceEnvironment\": \"production\",\n      \"endpoints\": [\n        {\n          \"method\": \"GET\",\n          \"path\": \"/users\",\n          \"description\": \"List all users\"\n        },\n        {\n          \"method\": \"POST\",\n          \"path\": \"/users\",\n          \"description\": \"Create a new user\"\n        },\n        {\n          \"method\": \"GET\",\n          \"path\": \"/users/{id}\",\n          \"description\": \"Get user by ID\"\n        },\n        {\n          \"method\": \"PUT\",\n          \"path\": \"/users/{id}\",\n          \"description\": \"Update user\"\n        },\n        {\n          \"method\": \"DELETE\",\n          \"path\": \"/users/{id}\",\n          \"description\": \"Delete user\"\n        }\n      ],\n      \"tags\": [\n        \"auth\",\n        \"core\",\n        \"identity\"\n      ],\n      \"providerMetadata\": {\n        \"commitSha\": \"a1b2c3d4e5f6\",\n        \"branch\": \"main\",\n        \"gitRepoUrl\": \"https://github.com/acme/user-service\",\n        \"deployedAt\": \"2026-02-10T12:00:00Z\"\n      }\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Add a Fully-Populated Service
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/api-catalog/discovery-services")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"discoveredServices\": [\n    {\n      \"name\": \"user-service\",\n      \"version\": \"3.0.0\",\n      \"providerServiceId\": \"usr-svc-custom-id-001\",\n      \"description\": \"Handles user registration, authentication, and profile management\",\n      \"sourceEnvironment\": \"production\",\n      \"endpoints\": [\n        {\n          \"method\": \"GET\",\n          \"path\": \"/users\",\n          \"description\": \"List all users\"\n        },\n        {\n          \"method\": \"POST\",\n          \"path\": \"/users\",\n          \"description\": \"Create a new user\"\n        },\n        {\n          \"method\": \"GET\",\n          \"path\": \"/users/{id}\",\n          \"description\": \"Get user by ID\"\n        },\n        {\n          \"method\": \"PUT\",\n          \"path\": \"/users/{id}\",\n          \"description\": \"Update user\"\n        },\n        {\n          \"method\": \"DELETE\",\n          \"path\": \"/users/{id}\",\n          \"description\": \"Delete user\"\n        }\n      ],\n      \"tags\": [\n        \"auth\",\n        \"core\",\n        \"identity\"\n      ],\n      \"providerMetadata\": {\n        \"commitSha\": \"a1b2c3d4e5f6\",\n        \"branch\": \"main\",\n        \"gitRepoUrl\": \"https://github.com/acme/user-service\",\n        \"deployedAt\": \"2026-02-10T12:00:00Z\"\n      }\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Add a Fully-Populated Service
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/api-catalog/discovery-services")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"discoveredServices\": [\n    {\n      \"name\": \"user-service\",\n      \"version\": \"3.0.0\",\n      \"providerServiceId\": \"usr-svc-custom-id-001\",\n      \"description\": \"Handles user registration, authentication, and profile management\",\n      \"sourceEnvironment\": \"production\",\n      \"endpoints\": [\n        {\n          \"method\": \"GET\",\n          \"path\": \"/users\",\n          \"description\": \"List all users\"\n        },\n        {\n          \"method\": \"POST\",\n          \"path\": \"/users\",\n          \"description\": \"Create a new user\"\n        },\n        {\n          \"method\": \"GET\",\n          \"path\": \"/users/{id}\",\n          \"description\": \"Get user by ID\"\n        },\n        {\n          \"method\": \"PUT\",\n          \"path\": \"/users/{id}\",\n          \"description\": \"Update user\"\n        },\n        {\n          \"method\": \"DELETE\",\n          \"path\": \"/users/{id}\",\n          \"description\": \"Delete user\"\n        }\n      ],\n      \"tags\": [\n        \"auth\",\n        \"core\",\n        \"identity\"\n      ],\n      \"providerMetadata\": {\n        \"commitSha\": \"a1b2c3d4e5f6\",\n        \"branch\": \"main\",\n        \"gitRepoUrl\": \"https://github.com/acme/user-service\",\n        \"deployedAt\": \"2026-02-10T12:00:00Z\"\n      }\n    }\n  ]\n}")
  .asString();
```

```php Add a Fully-Populated Service
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/api-catalog/discovery-services', [
  'body' => '{
  "discoveredServices": [
    {
      "name": "user-service",
      "version": "3.0.0",
      "providerServiceId": "usr-svc-custom-id-001",
      "description": "Handles user registration, authentication, and profile management",
      "sourceEnvironment": "production",
      "endpoints": [
        {
          "method": "GET",
          "path": "/users",
          "description": "List all users"
        },
        {
          "method": "POST",
          "path": "/users",
          "description": "Create a new user"
        },
        {
          "method": "GET",
          "path": "/users/{id}",
          "description": "Get user by ID"
        },
        {
          "method": "PUT",
          "path": "/users/{id}",
          "description": "Update user"
        },
        {
          "method": "DELETE",
          "path": "/users/{id}",
          "description": "Delete user"
        }
      ],
      "tags": [
        "auth",
        "core",
        "identity"
      ],
      "providerMetadata": {
        "commitSha": "a1b2c3d4e5f6",
        "branch": "main",
        "gitRepoUrl": "https://github.com/acme/user-service",
        "deployedAt": "2026-02-10T12:00:00Z"
      }
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Add a Fully-Populated Service
using RestSharp;

var client = new RestClient("https://api.getpostman.com/api-catalog/discovery-services");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"discoveredServices\": [\n    {\n      \"name\": \"user-service\",\n      \"version\": \"3.0.0\",\n      \"providerServiceId\": \"usr-svc-custom-id-001\",\n      \"description\": \"Handles user registration, authentication, and profile management\",\n      \"sourceEnvironment\": \"production\",\n      \"endpoints\": [\n        {\n          \"method\": \"GET\",\n          \"path\": \"/users\",\n          \"description\": \"List all users\"\n        },\n        {\n          \"method\": \"POST\",\n          \"path\": \"/users\",\n          \"description\": \"Create a new user\"\n        },\n        {\n          \"method\": \"GET\",\n          \"path\": \"/users/{id}\",\n          \"description\": \"Get user by ID\"\n        },\n        {\n          \"method\": \"PUT\",\n          \"path\": \"/users/{id}\",\n          \"description\": \"Update user\"\n        },\n        {\n          \"method\": \"DELETE\",\n          \"path\": \"/users/{id}\",\n          \"description\": \"Delete user\"\n        }\n      ],\n      \"tags\": [\n        \"auth\",\n        \"core\",\n        \"identity\"\n      ],\n      \"providerMetadata\": {\n        \"commitSha\": \"a1b2c3d4e5f6\",\n        \"branch\": \"main\",\n        \"gitRepoUrl\": \"https://github.com/acme/user-service\",\n        \"deployedAt\": \"2026-02-10T12:00:00Z\"\n      }\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Add a Fully-Populated Service
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["discoveredServices": [
    [
      "name": "user-service",
      "version": "3.0.0",
      "providerServiceId": "usr-svc-custom-id-001",
      "description": "Handles user registration, authentication, and profile management",
      "sourceEnvironment": "production",
      "endpoints": [
        [
          "method": "GET",
          "path": "/users",
          "description": "List all users"
        ],
        [
          "method": "POST",
          "path": "/users",
          "description": "Create a new user"
        ],
        [
          "method": "GET",
          "path": "/users/{id}",
          "description": "Get user by ID"
        ],
        [
          "method": "PUT",
          "path": "/users/{id}",
          "description": "Update user"
        ],
        [
          "method": "DELETE",
          "path": "/users/{id}",
          "description": "Delete user"
        ]
      ],
      "tags": ["auth", "core", "identity"],
      "providerMetadata": [
        "commitSha": "a1b2c3d4e5f6",
        "branch": "main",
        "gitRepoUrl": "https://github.com/acme/user-service",
        "deployedAt": "2026-02-10T12:00:00Z"
      ]
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/api-catalog/discovery-services")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Add Service with an OpenAPI Specification



**Request**

```json
{
  "discoveredServices": [
    {
      "name": "user-service",
      "version": "3.0.0",
      "description": "Handles user registration, authentication, and profile management.",
      "apiDefinition": {
        "content": "eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19="
      }
    }
  ]
}
```

**Response**

```json
{
  "data": [
    {
      "id": "9feb4e3c-0cd8-44db-b137-7bf09aee73cd",
      "organizationId": 123,
      "name": "user-service",
      "description": "Handles user registration, authentication, and profile management.",
      "version": "3.0.0",
      "sourceEnvironment": "production",
      "systemEnvironmentId": null,
      "tags": [
        "auth",
        "core",
        "identity"
      ],
      "status": "discovered",
      "endpointsCount": 5,
      "providerServiceId": "usr-svc-custom-id-001",
      "discoveredAt": "2026-02-25 03:22:54",
      "discoveredBy": 12345678,
      "lastSyncedAt": "2026-02-25 03:22:54"
    }
  ],
  "meta": {
    "total": 1,
    "created": 1,
    "updated": 0
  }
}
```

**SDK Code**

```python Add Service with an OpenAPI Specification
import requests

url = "https://api.getpostman.com/api-catalog/discovery-services"

payload = { "discoveredServices": [
        {
            "name": "user-service",
            "version": "3.0.0",
            "description": "Handles user registration, authentication, and profile management.",
            "apiDefinition": { "content": "eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19=" }
        }
    ] }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Add Service with an OpenAPI Specification
const url = 'https://api.getpostman.com/api-catalog/discovery-services';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"discoveredServices":[{"name":"user-service","version":"3.0.0","description":"Handles user registration, authentication, and profile management.","apiDefinition":{"content":"eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19="}}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Add Service with an OpenAPI Specification
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/api-catalog/discovery-services"

	payload := strings.NewReader("{\n  \"discoveredServices\": [\n    {\n      \"name\": \"user-service\",\n      \"version\": \"3.0.0\",\n      \"description\": \"Handles user registration, authentication, and profile management.\",\n      \"apiDefinition\": {\n        \"content\": \"eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19=\"\n      }\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Add Service with an OpenAPI Specification
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/api-catalog/discovery-services")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"discoveredServices\": [\n    {\n      \"name\": \"user-service\",\n      \"version\": \"3.0.0\",\n      \"description\": \"Handles user registration, authentication, and profile management.\",\n      \"apiDefinition\": {\n        \"content\": \"eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19=\"\n      }\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Add Service with an OpenAPI Specification
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/api-catalog/discovery-services")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"discoveredServices\": [\n    {\n      \"name\": \"user-service\",\n      \"version\": \"3.0.0\",\n      \"description\": \"Handles user registration, authentication, and profile management.\",\n      \"apiDefinition\": {\n        \"content\": \"eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19=\"\n      }\n    }\n  ]\n}")
  .asString();
```

```php Add Service with an OpenAPI Specification
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/api-catalog/discovery-services', [
  'body' => '{
  "discoveredServices": [
    {
      "name": "user-service",
      "version": "3.0.0",
      "description": "Handles user registration, authentication, and profile management.",
      "apiDefinition": {
        "content": "eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19="
      }
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Add Service with an OpenAPI Specification
using RestSharp;

var client = new RestClient("https://api.getpostman.com/api-catalog/discovery-services");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"discoveredServices\": [\n    {\n      \"name\": \"user-service\",\n      \"version\": \"3.0.0\",\n      \"description\": \"Handles user registration, authentication, and profile management.\",\n      \"apiDefinition\": {\n        \"content\": \"eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19=\"\n      }\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Add Service with an OpenAPI Specification
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["discoveredServices": [
    [
      "name": "user-service",
      "version": "3.0.0",
      "description": "Handles user registration, authentication, and profile management.",
      "apiDefinition": ["content": "eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19="]
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/api-catalog/discovery-services")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Add Multiple Services



**Request**

```json
{
  "discoveredServices": [
    {
      "name": "order-service",
      "version": "1.0.0"
    },
    {
      "name": "inventory-service",
      "version": "2.3.1"
    },
    {
      "name": "notification-service",
      "version": "0.9.0"
    }
  ]
}
```

**Response**

```json
{
  "data": [
    {
      "id": "9feb4e3c-0cd8-44db-b137-7bf09aee73cd",
      "organizationId": 123,
      "name": "user-service",
      "description": "Handles user registration, authentication, and profile management.",
      "version": "3.0.0",
      "sourceEnvironment": "production",
      "systemEnvironmentId": null,
      "tags": [
        "auth",
        "core",
        "identity"
      ],
      "status": "discovered",
      "endpointsCount": 5,
      "providerServiceId": "usr-svc-custom-id-001",
      "discoveredAt": "2026-02-25 03:22:54",
      "discoveredBy": 12345678,
      "lastSyncedAt": "2026-02-25 03:22:54"
    }
  ],
  "meta": {
    "total": 1,
    "created": 1,
    "updated": 0
  }
}
```

**SDK Code**

```python Add Multiple Services
import requests

url = "https://api.getpostman.com/api-catalog/discovery-services"

payload = { "discoveredServices": [
        {
            "name": "order-service",
            "version": "1.0.0"
        },
        {
            "name": "inventory-service",
            "version": "2.3.1"
        },
        {
            "name": "notification-service",
            "version": "0.9.0"
        }
    ] }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Add Multiple Services
const url = 'https://api.getpostman.com/api-catalog/discovery-services';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"discoveredServices":[{"name":"order-service","version":"1.0.0"},{"name":"inventory-service","version":"2.3.1"},{"name":"notification-service","version":"0.9.0"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Add Multiple Services
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/api-catalog/discovery-services"

	payload := strings.NewReader("{\n  \"discoveredServices\": [\n    {\n      \"name\": \"order-service\",\n      \"version\": \"1.0.0\"\n    },\n    {\n      \"name\": \"inventory-service\",\n      \"version\": \"2.3.1\"\n    },\n    {\n      \"name\": \"notification-service\",\n      \"version\": \"0.9.0\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Add Multiple Services
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/api-catalog/discovery-services")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"discoveredServices\": [\n    {\n      \"name\": \"order-service\",\n      \"version\": \"1.0.0\"\n    },\n    {\n      \"name\": \"inventory-service\",\n      \"version\": \"2.3.1\"\n    },\n    {\n      \"name\": \"notification-service\",\n      \"version\": \"0.9.0\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Add Multiple Services
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/api-catalog/discovery-services")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"discoveredServices\": [\n    {\n      \"name\": \"order-service\",\n      \"version\": \"1.0.0\"\n    },\n    {\n      \"name\": \"inventory-service\",\n      \"version\": \"2.3.1\"\n    },\n    {\n      \"name\": \"notification-service\",\n      \"version\": \"0.9.0\"\n    }\n  ]\n}")
  .asString();
```

```php Add Multiple Services
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/api-catalog/discovery-services', [
  'body' => '{
  "discoveredServices": [
    {
      "name": "order-service",
      "version": "1.0.0"
    },
    {
      "name": "inventory-service",
      "version": "2.3.1"
    },
    {
      "name": "notification-service",
      "version": "0.9.0"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Add Multiple Services
using RestSharp;

var client = new RestClient("https://api.getpostman.com/api-catalog/discovery-services");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"discoveredServices\": [\n    {\n      \"name\": \"order-service\",\n      \"version\": \"1.0.0\"\n    },\n    {\n      \"name\": \"inventory-service\",\n      \"version\": \"2.3.1\"\n    },\n    {\n      \"name\": \"notification-service\",\n      \"version\": \"0.9.0\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Add Multiple Services
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["discoveredServices": [
    [
      "name": "order-service",
      "version": "1.0.0"
    ],
    [
      "name": "inventory-service",
      "version": "2.3.1"
    ],
    [
      "name": "notification-service",
      "version": "0.9.0"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/api-catalog/discovery-services")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Add Multiple Services with OpenAPI Specifications and Endpoints



**Request**

```json
{
  "discoveredServices": [
    {
      "name": "analytics-service",
      "version": "1.2.0",
      "description": "Tracks usage analytics",
      "endpoints": [
        {
          "method": "POST",
          "path": "/events",
          "description": "Track event"
        },
        {
          "method": "GET",
          "path": "/reports",
          "description": "Get reports"
        }
      ]
    },
    {
      "name": "config-service",
      "version": "1.0.0",
      "apiDefinition": {
        "content": "eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19="
      }
    },
    {
      "name": "healthcheck"
    }
  ]
}
```

**Response**

```json
{
  "data": [
    {
      "id": "9feb4e3c-0cd8-44db-b137-7bf09aee73cd",
      "organizationId": 123,
      "name": "user-service",
      "description": "Handles user registration, authentication, and profile management.",
      "version": "3.0.0",
      "sourceEnvironment": "production",
      "systemEnvironmentId": null,
      "tags": [
        "auth",
        "core",
        "identity"
      ],
      "status": "discovered",
      "endpointsCount": 5,
      "providerServiceId": "usr-svc-custom-id-001",
      "discoveredAt": "2026-02-25 03:22:54",
      "discoveredBy": 12345678,
      "lastSyncedAt": "2026-02-25 03:22:54"
    }
  ],
  "meta": {
    "total": 1,
    "created": 1,
    "updated": 0
  }
}
```

**SDK Code**

```python Add Multiple Services with OpenAPI Specifications and Endpoints
import requests

url = "https://api.getpostman.com/api-catalog/discovery-services"

payload = { "discoveredServices": [{
            "name": "analytics-service",
            "version": "1.2.0",
            "description": "Tracks usage analytics",
            "endpoints": [
                {
                    "method": "POST",
                    "path": "/events",
                    "description": "Track event"
                },
                {
                    "method": "GET",
                    "path": "/reports",
                    "description": "Get reports"
                }
            ]
        }, {
            "name": "config-service",
            "version": "1.0.0",
            "apiDefinition": { "content": "eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19=" }
        }, { "name": "healthcheck" }] }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Add Multiple Services with OpenAPI Specifications and Endpoints
const url = 'https://api.getpostman.com/api-catalog/discovery-services';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"discoveredServices":[{"name":"analytics-service","version":"1.2.0","description":"Tracks usage analytics","endpoints":[{"method":"POST","path":"/events","description":"Track event"},{"method":"GET","path":"/reports","description":"Get reports"}]},{"name":"config-service","version":"1.0.0","apiDefinition":{"content":"eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19="}},{"name":"healthcheck"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Add Multiple Services with OpenAPI Specifications and Endpoints
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/api-catalog/discovery-services"

	payload := strings.NewReader("{\n  \"discoveredServices\": [\n    {\n      \"name\": \"analytics-service\",\n      \"version\": \"1.2.0\",\n      \"description\": \"Tracks usage analytics\",\n      \"endpoints\": [\n        {\n          \"method\": \"POST\",\n          \"path\": \"/events\",\n          \"description\": \"Track event\"\n        },\n        {\n          \"method\": \"GET\",\n          \"path\": \"/reports\",\n          \"description\": \"Get reports\"\n        }\n      ]\n    },\n    {\n      \"name\": \"config-service\",\n      \"version\": \"1.0.0\",\n      \"apiDefinition\": {\n        \"content\": \"eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19=\"\n      }\n    },\n    {\n      \"name\": \"healthcheck\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Add Multiple Services with OpenAPI Specifications and Endpoints
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/api-catalog/discovery-services")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"discoveredServices\": [\n    {\n      \"name\": \"analytics-service\",\n      \"version\": \"1.2.0\",\n      \"description\": \"Tracks usage analytics\",\n      \"endpoints\": [\n        {\n          \"method\": \"POST\",\n          \"path\": \"/events\",\n          \"description\": \"Track event\"\n        },\n        {\n          \"method\": \"GET\",\n          \"path\": \"/reports\",\n          \"description\": \"Get reports\"\n        }\n      ]\n    },\n    {\n      \"name\": \"config-service\",\n      \"version\": \"1.0.0\",\n      \"apiDefinition\": {\n        \"content\": \"eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19=\"\n      }\n    },\n    {\n      \"name\": \"healthcheck\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Add Multiple Services with OpenAPI Specifications and Endpoints
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/api-catalog/discovery-services")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"discoveredServices\": [\n    {\n      \"name\": \"analytics-service\",\n      \"version\": \"1.2.0\",\n      \"description\": \"Tracks usage analytics\",\n      \"endpoints\": [\n        {\n          \"method\": \"POST\",\n          \"path\": \"/events\",\n          \"description\": \"Track event\"\n        },\n        {\n          \"method\": \"GET\",\n          \"path\": \"/reports\",\n          \"description\": \"Get reports\"\n        }\n      ]\n    },\n    {\n      \"name\": \"config-service\",\n      \"version\": \"1.0.0\",\n      \"apiDefinition\": {\n        \"content\": \"eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19=\"\n      }\n    },\n    {\n      \"name\": \"healthcheck\"\n    }\n  ]\n}")
  .asString();
```

```php Add Multiple Services with OpenAPI Specifications and Endpoints
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/api-catalog/discovery-services', [
  'body' => '{
  "discoveredServices": [
    {
      "name": "analytics-service",
      "version": "1.2.0",
      "description": "Tracks usage analytics",
      "endpoints": [
        {
          "method": "POST",
          "path": "/events",
          "description": "Track event"
        },
        {
          "method": "GET",
          "path": "/reports",
          "description": "Get reports"
        }
      ]
    },
    {
      "name": "config-service",
      "version": "1.0.0",
      "apiDefinition": {
        "content": "eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19="
      }
    },
    {
      "name": "healthcheck"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Add Multiple Services with OpenAPI Specifications and Endpoints
using RestSharp;

var client = new RestClient("https://api.getpostman.com/api-catalog/discovery-services");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"discoveredServices\": [\n    {\n      \"name\": \"analytics-service\",\n      \"version\": \"1.2.0\",\n      \"description\": \"Tracks usage analytics\",\n      \"endpoints\": [\n        {\n          \"method\": \"POST\",\n          \"path\": \"/events\",\n          \"description\": \"Track event\"\n        },\n        {\n          \"method\": \"GET\",\n          \"path\": \"/reports\",\n          \"description\": \"Get reports\"\n        }\n      ]\n    },\n    {\n      \"name\": \"config-service\",\n      \"version\": \"1.0.0\",\n      \"apiDefinition\": {\n        \"content\": \"eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19=\"\n      }\n    },\n    {\n      \"name\": \"healthcheck\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Add Multiple Services with OpenAPI Specifications and Endpoints
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["discoveredServices": [[
      "name": "analytics-service",
      "version": "1.2.0",
      "description": "Tracks usage analytics",
      "endpoints": [
        [
          "method": "POST",
          "path": "/events",
          "description": "Track event"
        ],
        [
          "method": "GET",
          "path": "/reports",
          "description": "Get reports"
        ]
      ]
    ], [
      "name": "config-service",
      "version": "1.0.0",
      "apiDefinition": ["content": "eyJvcGVuYXBpIjoiMy4wLjAiLCJpbmZvIjp7InRpdGxlIjoiQ29uZmlnIiwidmVyc2lvbiI6IjEuMC4wIn0sInBhdGhzIjp7Ii9jb25maWciOnsiZ2V0Ijp7InN1bW1hcnkiOiJHZXQgY29uZmlnIn19LCIvY29uZmlnL3trZXl9Ijp7InB1dCI6eyJzdW1tYXJ5IjoiVXBkYXRlIGNvbmZpZyJ9fX19="]
    ], ["name": "healthcheck"]]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/api-catalog/discovery-services")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```