> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Onchain Address Book Entry

> Creates an entry to the portfolio's onchain address groups.



## OpenAPI

````yaml POST /v1/portfolios/{portfolio_id}/onchain_address_group
openapi: 3.0.1
info:
  title: REST API
  description: >-
    The Coinbase Prime REST API provides programmatic access to trading,
    custody, staking, market data, and account management functionality.
  version: '0.1'
servers:
  - url: https://api.prime.coinbase.com/
security: []
tags:
  - name: PrimeRESTAPI
paths:
  /v1/portfolios/{portfolio_id}/onchain_address_group:
    post:
      tags:
        - Onchain Address Book
      summary: Create Onchain Address Book Entry
      description: Creates an entry to the portfolio's onchain address groups.
      operationId: PrimeRESTAPI_CreateOnchainAddressGroup
      parameters:
        - name: portfolio_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              title: >-
                ChangeOnchainAddressGroupRequest is a request to create or
                update a new onchain address group
              required:
                - address_group
              type: object
              properties:
                address_group:
                  $ref: '#/components/schemas/coinbase.public_rest_api.AddressGroup'
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_rest_api.ActivityCreationResponse
components:
  schemas:
    coinbase.public_rest_api.AddressGroup:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        network_type:
          $ref: '#/components/schemas/coinbase.public_rest_api.NetworkType'
        addresses:
          title: A list of addresses within the group
          type: array
          items:
            $ref: '#/components/schemas/coinbase.public_rest_api.AddressEntry'
        added_at:
          type: string
          format: date-time
    coinbase.public_rest_api.ActivityCreationResponse:
      required:
        - activity_id
        - activity_type
        - num_approvals_remaining
      type: object
      properties:
        activity_type:
          $ref: '#/components/schemas/coinbase.custody.api.ActivityType'
        num_approvals_remaining:
          type: integer
          format: int32
        activity_id:
          type: string
    coinbase.public_rest_api.NetworkType:
      type: string
      default: NETWORK_TYPE_UNSPECIFIED
      enum:
        - NETWORK_TYPE_UNSPECIFIED
        - NETWORK_TYPE_EVM
        - NETWORK_TYPE_SOLANA
    coinbase.public_rest_api.AddressEntry:
      type: object
      properties:
        name:
          type: string
        address:
          type: string
        chain_ids:
          title: List of compatible chain IDs for a given address, empty for Solana
          type: array
          items:
            type: string
    coinbase.custody.api.ActivityType:
      title: >-
        - ACTIVITY_TYPE_WITHDRAWAL: PrimeActivityService Custody ActivityTypes
        that will replace the above
      type: string
      enum:
        - ACTIVITY_TYPE_GOVERNANCE_VOTE
        - ACTIVITY_TYPE_INVITATION
        - ACTIVITY_TYPE_WALLET_CHANGE
        - ACTIVITY_TYPE_API_KEY_CHANGE
        - ACTIVITY_TYPE_SETTINGS_CHANGE
        - ACTIVITY_TYPE_BILLING_PREFERENCE_CHANGE
        - ACTIVITY_TYPE_PAYMENT_METHOD_CHANGE
        - ACTIVITY_TYPE_WITHDRAWAL
        - ACTIVITY_TYPE_DEPOSIT
        - ACTIVITY_TYPE_CREATE_WALLET
        - ACTIVITY_TYPE_REMOVE_WALLET
        - ACTIVITY_TYPE_UPDATE_WALLET
        - ACTIVITY_TYPE_CAST_VOTE
        - ACTIVITY_TYPE_ENABLE_VOTING
        - ACTIVITY_TYPE_STAKE
        - ACTIVITY_TYPE_UNSTAKE
        - ACTIVITY_TYPE_CHANGE_VALIDATOR
        - ACTIVITY_TYPE_RESTAKE
        - ACTIVITY_TYPE_ADDRESS_BOOK
        - ACTIVITY_TYPE_TEAM_MEMBERS
        - ACTIVITY_TYPE_BILLING
        - ACTIVITY_TYPE_SECURITY
        - ACTIVITY_TYPE_API
        - ACTIVITY_TYPE_SETTINGS
        - ACTIVITY_TYPE_SMART_CONTRACT
        - ACTIVITY_TYPE_USER_CHANGE_REQUEST_NO_PAS
        - ACTIVITY_TYPE_WEB3_TRANSACTION
        - ACTIVITY_TYPE_WEB3_MESSAGE
        - ACTIVITY_TYPE_CLAIM_REWARDS

````