---
updatedAt: 2025-06-12T13:58:20.000Z
agentTools:
  projectIndex: https://developer.data.world/llms.txt
---

# Creates a relationship between two catalog resources identified by IRI

Creates a directed relationship between two catalog resources with one being the source and the other being the target.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "contact": {
      "name": "Contact Us",
      "url": "https://data.world/company/contact-us"
    },
    "termsOfService": "https://data.world/terms-policies",
    "title": "data.world Public API",
    "version": "0"
  },
  "servers": [
    {
      "url": "https://api.data.world/v0"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "description": "Manage relationships between catalog resources",
      "name": "catalog relationships"
    }
  ],
  "paths": {
    "/metadata/relationships/{owner}/iri/create": {
      "post": {
        "description": "Creates a directed relationship between two catalog resources with one being the source and the other being the target.",
        "operationId": "createRelationshipByIri",
        "parameters": [
          {
            "description": "User name and unique identifier of the user or organization a resource belongs to.\nFor example, in the URL: https://acme.data.world/jonloyens/an-intro-to-dataworld-dataset, jonloyens is the unique identifier of the owner.\n",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RelationshipCreateOrDeleteRequestByIri"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessMessage"
                }
              }
            },
            "description": "default response"
          }
        },
        "summary": "Creates a relationship between two catalog resources identified by IRI",
        "tags": [
          "catalog relationships"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "RelationshipCreateOrDeleteRequestByIri": {
        "type": "object",
        "properties": {
          "iri": {
            "type": "string",
            "description": "IRI of the relationship type"
          },
          "sourceIri": {
            "type": "string",
            "description": "IRI of the source resource"
          },
          "sourceType": {
            "type": "string",
            "description": "IRI of source resource's type"
          },
          "targetIri": {
            "type": "string",
            "description": "IRI of the target resource"
          }
        },
        "required": [
          "iri",
          "sourceIri",
          "sourceType",
          "targetIri"
        ]
      },
      "SuccessMessage": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "maxLength": 256,
            "minLength": 0
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "bearerFormat": "JWT",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "jsonSchemaDialect": "https://spec.openapis.org/oas/3.1/dialect/base"
}
```